MCPcopy Create free account
hub / github.com/apache/impala / test_udf_errors

Method test_udf_errors

tests/query_test/test_udfs.py:357–374  ·  view source on GitHub ↗
(self, vector, unique_database)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 9

get_fs_pathFunction · 0.90
run_test_caseMethod · 0.80
closeMethod · 0.65
formatMethod · 0.45
writeMethod · 0.45
copy_from_localMethod · 0.45
get_valueMethod · 0.45
existsMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected