wilmerdooley opened a new pull request, #28490: URL: https://github.com/apache/flink/pull/28490
When a PyFlink DataStream is produced by sources such as `CsvReaderFormat`, its underlying Java `TypeInformation` is an `InternalTypeInfo` wrapping a `RowData` logical type. The Python `_from_java_type` helper did not recognize this class, so calls like `DataStream.get_type()` and `DataStream.assign_timestamps_and_watermarks()` raised `TypeError: The java type info: ... is not supported in PyFlink currently.`, forcing users to insert an identity map as a workaround. This change adds a branch in `flink-python/pyflink/common/typeinfo.py` that detects `InternalTypeInfo`, converts it back to its logical type, and then runs it through `LogicalTypeDataTypeConverter`/`LegacyTypeInfoDataTypeConverter` to obtain a legacy `TypeInformation` that can be mapped to a PyFlink type. A unit test in `flink-python/pyflink/common/tests/test_typeinfo.py` covers the round-trip from `InternalTypeInfo` to `Types.ROW(...)`. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes (please specify the tool below) JIRA: https://issues.apache.org/jira/browse/FLINK-39724 Generated-by: Claude Code -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
