edgarRd opened a new pull request, #17157: URL: https://github.com/apache/iceberg/pull/17157
`ParquetConversions.converterFromParquet` special-cased only the `UTF8` original type, so for `ENUM`- or `JSON`-annotated Parquet columns it fell through to the binary path and returned a `ByteBuffer`. Iceberg maps both `ENUM` and `JSON` to `StringType` (see `MessageTypeToType`), so at read time the metrics/dictionary row-group filters compared that `ByteBuffer` against a `CharSequence` predicate literal and threw: ``` class java.nio.HeapByteBuffer cannot be cast to class java.lang.CharSequence ``` This is reachable for files written by other engines (e.g. Flink, which uses JSON columns) and added via `add_files`: querying such a column with a predicate triggers row-group filtering. This change treats `ENUM` and `JSON` like `UTF8` and decodes them to a `CharSequence`. The import/metrics path (`ParquetConversions.convertValue`) already switches on the Iceberg type and was unaffected. Adds `TestParquetConversions` covering the ENUM/JSON conversion paths. -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
