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
I'm trying to read an AWS Security Lake using Iceberg and Glue natively via IcebergGenerics.read(table).where(filterExpression).build(). The schema read has no IDs (ParquetSchemaUtil.hasIds(fileSchema) == false) in ReadConf, so it creates fallback IDs via typeWithIds = ParquetSchemaUtil.addFallbackIds(fileSchema);
This creates problems further down the road at the element optional group feature and results in an NPE: java.lang.NullPointerException: Cannot invoke "org.apache.parquet.schema.Type$ID.intValue()" because the return value of "org.apache.parquet.schema.Type.getId()" is null
Apache Iceberg version
1.7.1 (latest release)
Query engine
None
Please describe the bug 🐞
Hi,
I'm trying to read an AWS Security Lake using Iceberg and Glue natively via
IcebergGenerics.read(table).where(filterExpression).build()
. The schema read has no IDs (ParquetSchemaUtil.hasIds(fileSchema)
== false) inReadConf
, so it creates fallback IDs viatypeWithIds = ParquetSchemaUtil.addFallbackIds(fileSchema);
This creates problems further down the road at the element
optional group feature
and results in an NPE:java.lang.NullPointerException: Cannot invoke "org.apache.parquet.schema.Type$ID.intValue()" because the return value of "org.apache.parquet.schema.Type.getId()" is null
at https://github.com/apache/iceberg/blame/e5d2343a550985a125db00b2460c3008298529dc/parquet/src/main/java/org/apache/iceberg/data/parquet/BaseParquetReaders.java#L248
This is the beginning of the schema without IDs:
This is the schema after
ParquetSchemaUtil.addFallbackIds(fileSchema);
Should the
ParquetSchemaUtil.addFallbackIds(fileSchema);
method maybe create IDs for structs deeper in the hierarchy, too?Digging through the code deeper, IMHO
iceberg/parquet/src/main/java/org/apache/iceberg/parquet/ParquetSchemaUtil.java
Line 98 in d402f83
Willingness to contribute
The text was updated successfully, but these errors were encountered: