Details
-
Bug
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
1.15.0, 1.16.0, 1.17.0, 1.19.0
-
None
Description
Mar 31 10:49:17 =================================== FAILURES =================================== Mar 31 10:49:17 ______________ EmbeddedThreadDependencyTests.test_add_python_file ______________ Mar 31 10:49:17 Mar 31 10:49:17 self = <pyflink.table.tests.test_dependency.EmbeddedThreadDependencyTests testMethod=test_add_python_file> Mar 31 10:49:17 Mar 31 10:49:17 def test_add_python_file(self): Mar 31 10:49:17 python_file_dir = os.path.join(self.tempdir, "python_file_dir_" + str(uuid.uuid4())) Mar 31 10:49:17 os.mkdir(python_file_dir) Mar 31 10:49:17 python_file_path = os.path.join(python_file_dir, "test_dependency_manage_lib.py") Mar 31 10:49:17 with open(python_file_path, 'w') as f: Mar 31 10:49:17 f.write("def add_two(a):\n raise Exception('This function should not be called!')") Mar 31 10:49:17 self.t_env.add_python_file(python_file_path) Mar 31 10:49:17 Mar 31 10:49:17 python_file_dir_with_higher_priority = os.path.join( Mar 31 10:49:17 self.tempdir, "python_file_dir_" + str(uuid.uuid4())) Mar 31 10:49:17 os.mkdir(python_file_dir_with_higher_priority) Mar 31 10:49:17 python_file_path_higher_priority = os.path.join(python_file_dir_with_higher_priority, Mar 31 10:49:17 "test_dependency_manage_lib.py") Mar 31 10:49:17 with open(python_file_path_higher_priority, 'w') as f: Mar 31 10:49:17 f.write("def add_two(a):\n return a + 2") Mar 31 10:49:17 self.t_env.add_python_file(python_file_path_higher_priority) Mar 31 10:49:17 Mar 31 10:49:17 def plus_two(i): Mar 31 10:49:17 from test_dependency_manage_lib import add_two Mar 31 10:49:17 return add_two(i) Mar 31 10:49:17 Mar 31 10:49:17 self.t_env.create_temporary_system_function( Mar 31 10:49:17 "add_two", udf(plus_two, DataTypes.BIGINT(), DataTypes.BIGINT())) Mar 31 10:49:17 table_sink = source_sink_utils.TestAppendSink( Mar 31 10:49:17 ['a', 'b'], [DataTypes.BIGINT(), DataTypes.BIGINT()]) Mar 31 10:49:17 self.t_env.register_table_sink("Results", table_sink) Mar 31 10:49:17 t = self.t_env.from_elements([(1, 2), (2, 5), (3, 1)], ['a', 'b']) Mar 31 10:49:17 > t.select(expr.call("add_two", t.a), t.a).execute_insert("Results").wait() Mar 31 10:49:17 Mar 31 10:49:17 pyflink/table/tests/test_dependency.py:63: Mar 31 10:49:17 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ Mar 31 10:49:17 pyflink/table/table_result.py:76: in wait Mar 31 10:49:17 get_method(self._j_table_result, "await")() Mar 31 10:49:17 .tox/py38-cython/lib/python3.8/site-packages/py4j/java_gateway.py:1321: in __call__
Attachments
Issue Links
- is duplicated by
-
FLINK-34011 EmbeddedThreadDependencyTests.test_add_python_file fails with This function should not be called!
- Closed