[ 
https://issues.apache.org/jira/browse/FLINK-31526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17756750#comment-17756750
 ] 

Matthias Pohl commented on FLINK-31526:
---------------------------------------

I updated the title and issue description. The previous description wasn't 
pointing to the actual error. But it looks the issue never appeared again

> DataStreamConversionTestCases.test_from_data_stream_with_schema failed due to 
> org.apache.flink.table.types.logical.CharType not existing in the JVM
> ---------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-31526
>                 URL: https://issues.apache.org/jira/browse/FLINK-31526
>             Project: Flink
>          Issue Type: Bug
>          Components: API / Python
>    Affects Versions: 1.16.1
>            Reporter: Matthias Pohl
>            Priority: Minor
>              Labels: auto-deprioritized-major, test-stability
>
> https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=47328&view=logs&j=821b528f-1eed-5598-a3b4-7f748b13f261&t=6bb545dd-772d-5d8c-f258-f5085fba3295&l=34487
> {code}
> Mar 19 04:08:57 =================================== FAILURES 
> ===================================
> Mar 19 04:08:57 _______ 
> DataStreamConversionTestCases.test_from_data_stream_with_schema ________
> Mar 19 04:08:57 
> Mar 19 04:08:57 self = 
> <pyflink.table.tests.test_table_environment_api.DataStreamConversionTestCases 
> testMethod=test_from_data_stream_with_schema>
> Mar 19 04:08:57 
> Mar 19 04:08:57     def test_from_data_stream_with_schema(self):
> Mar 19 04:08:57         from pyflink.table import Schema
> Mar 19 04:08:57     
> Mar 19 04:08:57         ds = self.env.from_collection([(1, 'Hi', 'Hello'), 
> (2, 'Hello', 'Hi')],
> Mar 19 04:08:57                                       
> type_info=Types.ROW_NAMED(
> Mar 19 04:08:57                                           ["a", "b", "c"],
> Mar 19 04:08:57                                           [Types.INT(), 
> Types.STRING(), Types.STRING()]))
> Mar 19 04:08:57     
> Mar 19 04:08:57         table = self.t_env.from_data_stream(ds,
> Mar 19 04:08:57                                             
> Schema.new_builder()
> Mar 19 04:08:57                                                   
> .column("a", DataTypes.INT())
> Mar 19 04:08:57                                                   
> .column("b", DataTypes.STRING())
> Mar 19 04:08:57                                                   
> .column("c", DataTypes.STRING())
> Mar 19 04:08:57                                                   .build())
> Mar 19 04:08:57         result = table.execute()
> Mar 19 04:08:57 >       with result.collect() as result:
> Mar 19 04:08:57 
> Mar 19 04:08:57 pyflink/table/tests/test_table_environment_api.py:416: 
> Mar 19 04:08:57 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ _ _ _ _ _ _ _ _ 
> Mar 19 04:08:57 pyflink/table/table_result.py:196: in collect
> Mar 19 04:08:57     return CloseableIterator(j_iter, field_data_types)
> Mar 19 04:08:57 pyflink/table/table_result.py:229: in __init__
> Mar 19 04:08:57     self._data_types = 
> [_from_java_data_type(j_field_data_type)
> Mar 19 04:08:57 pyflink/table/table_result.py:229: in <listcomp>
> Mar 19 04:08:57     self._data_types = 
> [_from_java_data_type(j_field_data_type)
> Mar 19 04:08:57 pyflink/table/types.py:1693: in _from_java_data_type
> Mar 19 04:08:57     if is_instance_of(logical_type, gateway.jvm.CharType):
> Mar 19 04:08:57 pyflink/util/java_utils.py:70: in is_instance_of
> Mar 19 04:08:57     param = get_java_class(java_class)
> Mar 19 04:08:57 
> .tox/py39-cython/lib/python3.9/site-packages/py4j/java_gateway.py:475: in 
> get_java_class
> Mar 19 04:08:57     return java_class._java_lang_class
> Mar 19 04:08:57 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ _ _ _ _ _ _ _ _ 
> Mar 19 04:08:57 
> Mar 19 04:08:57 self = <py4j.java_gateway.JavaClass object at 0x7f12f8f855b0>
> Mar 19 04:08:57 
> Mar 19 04:08:57     @property
> Mar 19 04:08:57     def _java_lang_class(self):
> Mar 19 04:08:57         """Gets the java.lang.Class of the current JavaClass. 
> This is
> Mar 19 04:08:57         equivalent to calling .class in Java.
> Mar 19 04:08:57         """
> Mar 19 04:08:57         command = proto.REFLECTION_COMMAND_NAME +\
> Mar 19 04:08:57             proto.REFL_GET_JAVA_LANG_CLASS_SUB_COMMAND_NAME +\
> Mar 19 04:08:57             self._fqn + "\n" + proto.END_COMMAND_PART
> Mar 19 04:08:57         answer = self._gateway_client.send_command(command)
> Mar 19 04:08:57     
> Mar 19 04:08:57         if len(answer) > 1 and answer[0] == proto.SUCCESS:
> Mar 19 04:08:57             return get_return_value(
> Mar 19 04:08:57                 answer, self._gateway_client, self._fqn, 
> "_java_lang_class")
> Mar 19 04:08:57         else:
> Mar 19 04:08:57 >           raise Py4JError(
> Mar 19 04:08:57                 "{0} does not exist in the 
> JVM".format(self._fqn))
> Mar 19 04:08:57 E           py4j.protocol.Py4JError: 
> org.apache.flink.table.types.logical.CharType does not exist in the JVM
> [...]
> {code}



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

Reply via email to