You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Kafka Connect: UUID columns fail to write with Parquet (ClassCastException) #17076
Query engine
Kafka Connect (N/A — not Spark/Flink)
Please describe the bug RecordConverter.convertUUID() (kafka-connect/kafka-connect/src/main/java/org/apache/iceberg/connect/data/RecordConverter.java line 508) converts UUID values to byte[] when the target file format is Parquet. The Parquet UUID writer, ParquetValueWriters.uuids() (via BaseParquetWriter's default visitor), expects a java.util.UUID and converts to bytes internally, so a byte[] fails to cast during write. ORC (GenericOrcWriters.uuids()) and Avro both write UUID directly — only the Parquet branch in convertUUID diverges from this.
Steps to reproduce
Sink a record with a UUID field to an Iceberg table using the default file format (Parquet). IcebergWriter.convertToRow() calls convertUUID(), which returns byte[]; the Parquet writer stack then throws on write.
Expected: the record writes successfully.
Actual: ClassCastException: class [B cannot be cast to class java.util.UUID.
Additional context
The byte[] conversion matched the Parquet writer contract before PR #11904 ("Parquet: Add readers and writers for the internal object model", merged 2025-01-24) changed ParquetValueWriters' UUID writer to accept UUID directly. kafka-connect was never updated to follow, making this a regression from that writer-contract change.
Activity