(self, vector, unique_database)
| 355 | use_db=unique_database) |
| 356 | |
| 357 | def test_udf_errors(self, vector, unique_database): |
| 358 | # Only run with codegen disabled to force interpretation path to be taken. |
| 359 | # Aim to exercise two failure cases: |
| 360 | # 1. too many arguments |
| 361 | # 2. IR UDF |
| 362 | fd, dir_name = tempfile.mkstemp() |
| 363 | hdfs_path = get_fs_path("/test-warehouse/{0}_bad_udf.ll".format(unique_database)) |
| 364 | try: |
| 365 | with open(dir_name, "w") as f: |
| 366 | f.write("Hello World") |
| 367 | self.filesystem_client.copy_from_local(f.name, hdfs_path) |
| 368 | if vector.get_value('exec_option')['disable_codegen']: |
| 369 | self.run_test_case('QueryTest/udf-errors', vector, use_db=unique_database) |
| 370 | finally: |
| 371 | if os.path.exists(f.name): |
| 372 | os.remove(f.name) |
| 373 | call(["hadoop", "fs", "-rm", "-f", hdfs_path]) |
| 374 | os.close(fd) |
| 375 | |
| 376 | # Run serially because this will blow the process limit, potentially causing other |
| 377 | # queries to fail |
nothing calls this directly
no test coverage detected