You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Matthias Pohl (Jira)" <ji...@apache.org> on 2023/08/21 10:53:00 UTC

[jira] [Updated] (FLINK-30913) PyFlinkStreamUserDefinedFunctionTests.test_chaining_scalar_function failed due to missing response from the Java side

     [ https://issues.apache.org/jira/browse/FLINK-30913?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthias Pohl updated FLINK-30913:
----------------------------------
    Summary: PyFlinkStreamUserDefinedFunctionTests.test_chaining_scalar_function failed due to missing response from the Java side  (was: Various PyFlink tests fail)

> PyFlinkStreamUserDefinedFunctionTests.test_chaining_scalar_function failed due to missing response from the Java side
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-30913
>                 URL: https://issues.apache.org/jira/browse/FLINK-30913
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Python
>    Affects Versions: 1.15.3
>            Reporter: Matthias Pohl
>            Priority: Major
>              Labels: auto-deprioritized-critical, test-stability
>
> https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=45731&view=logs&j=821b528f-1eed-5598-a3b4-7f748b13f261&t=6bb545dd-772d-5d8c-f258-f5085fba3295&l=29792
> {code}
> Feb 06 04:45:58 =================================== FAILURES ===================================
> Feb 06 04:45:58 _____ PyFlinkStreamUserDefinedFunctionTests.test_chaining_scalar_function ______
> Feb 06 04:45:58 
> Feb 06 04:45:58 self = <pyflink.table.tests.test_udf.PyFlinkStreamUserDefinedFunctionTests testMethod=test_chaining_scalar_function>
> Feb 06 04:45:58 
> Feb 06 04:45:58     def test_chaining_scalar_function(self):
> Feb 06 04:45:58         add_one = udf(lambda i: i + 1, result_type=DataTypes.BIGINT())
> Feb 06 04:45:58         subtract_one = udf(SubtractOne(), result_type=DataTypes.BIGINT())
> Feb 06 04:45:58     
> Feb 06 04:45:58         table_sink = source_sink_utils.TestAppendSink(
> Feb 06 04:45:58             ['a', 'b', 'c'],
> Feb 06 04:45:58             [DataTypes.BIGINT(), DataTypes.BIGINT(), DataTypes.INT()])
> Feb 06 04:45:58         self.t_env.register_table_sink("Results", table_sink)
> Feb 06 04:45:58     
> Feb 06 04:45:58         t = self.t_env.from_elements([(1, 2, 1), (2, 5, 2), (3, 1, 3)], ['a', 'b', 'c'])
> Feb 06 04:45:58 >       t.select(add(add_one(t.a), subtract_one(t.b)), t.c, expr.lit(1)) \
> Feb 06 04:45:58             .execute_insert("Results").wait()
> Feb 06 04:45:58 
> Feb 06 04:45:58 pyflink/table/tests/test_udf.py:89: 
> Feb 06 04:45:58 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> Feb 06 04:45:58 pyflink/table/table.py:1088: in execute_insert
> Feb 06 04:45:58     return TableResult(self._j_table.executeInsert(table_path_or_descriptor, overwrite))
> Feb 06 04:45:58 .tox/py38-cython/lib/python3.8/site-packages/py4j/java_gateway.py:1321: in __call__
> Feb 06 04:45:58     return_value = get_return_value(
> Feb 06 04:45:58 pyflink/util/exceptions.py:146: in deco
> Feb 06 04:45:58     return f(*a, **kw)
> Feb 06 04:45:58 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> Feb 06 04:45:58 
> Feb 06 04:45:58 answer = 'x'
> Feb 06 04:45:58 gateway_client = <py4j.java_gateway.GatewayClient object at 0x7fef18871160>
> Feb 06 04:45:58 target_id = 'o21847', name = 'executeInsert'
> Feb 06 04:45:58 
> Feb 06 04:45:58     def get_return_value(answer, gateway_client, target_id=None, name=None):
> Feb 06 04:45:58         """Converts an answer received from the Java gateway into a Python object.
> Feb 06 04:45:58     
> Feb 06 04:45:58         For example, string representation of integers are converted to Python
> Feb 06 04:45:58         integer, string representation of objects are converted to JavaObject
> Feb 06 04:45:58         instances, etc.
> Feb 06 04:45:58     
> Feb 06 04:45:58         :param answer: the string returned by the Java gateway
> Feb 06 04:45:58         :param gateway_client: the gateway client used to communicate with the Java
> Feb 06 04:45:58             Gateway. Only necessary if the answer is a reference (e.g., object,
> Feb 06 04:45:58             list, map)
> Feb 06 04:45:58         :param target_id: the name of the object from which the answer comes from
> Feb 06 04:45:58             (e.g., *object1* in `object1.hello()`). Optional.
> Feb 06 04:45:58         :param name: the name of the member from which the answer comes from
> Feb 06 04:45:58             (e.g., *hello* in `object1.hello()`). Optional.
> Feb 06 04:45:58         """
> Feb 06 04:45:58         if is_error(answer)[0]:
> Feb 06 04:45:58             if len(answer) > 1:
> Feb 06 04:45:58                 type = answer[1]
> Feb 06 04:45:58                 value = OUTPUT_CONVERTER[type](answer[2:], gateway_client)
> Feb 06 04:45:58                 if answer[1] == REFERENCE_TYPE:
> Feb 06 04:45:58                     raise Py4JJavaError(
> Feb 06 04:45:58                         "An error occurred while calling {0}{1}{2}.\n".
> Feb 06 04:45:58                         format(target_id, ".", name), value)
> Feb 06 04:45:58                 else:
> Feb 06 04:45:58                     raise Py4JError(
> Feb 06 04:45:58                         "An error occurred while calling {0}{1}{2}. Trace:\n{3}\n".
> Feb 06 04:45:58                         format(target_id, ".", name, value))
> Feb 06 04:45:58             else:
> Feb 06 04:45:58 >               raise Py4JError(
> Feb 06 04:45:58                     "An error occurred while calling {0}{1}{2}".
> Feb 06 04:45:58                     format(target_id, ".", name))
> Feb 06 04:45:58 E               py4j.protocol.Py4JError: An error occurred while calling o21847.executeInsert
> Feb 06 04:45:58 
> Feb 06 04:45:58 .tox/py38-cython/lib/python3.8/site-packages/py4j/protocol.py:334: Py4JError
> Feb 06 04:45:58 ------------------------------ Captured log call -------------------------------
> Feb 06 04:45:58 ERROR    root:java_gateway.py:1055 Exception while sending command.
> Feb 06 04:45:58 Traceback (most recent call last):
> Feb 06 04:45:58   File "/__w/1/s/flink-python/.tox/py38-cython/lib/python3.8/site-packages/py4j/java_gateway.py", line 1224, in send_command
> Feb 06 04:45:58     raise Py4JNetworkError("Answer from Java side is empty")
> Feb 06 04:45:58 py4j.protocol.Py4JNetworkError: Answer from Java side is empty
> [...]
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)