You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "janheise (via GitHub)" <gi...@apache.org> on 2024/12/10 15:11:15 UTC

[I] Reading a table without schema IDs [iceberg]

janheise opened a new issue, #11740:
URL: https://github.com/apache/iceberg/issues/11740

   ### 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) 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`
   
   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:
   ```
   optional group metadata {
       optional group product {
         required binary version (STRING);
         required binary name (STRING);
         required binary vendor_name (STRING);
         optional group feature {
           required binary name (STRING);
         }
       }
       optional binary event_code (STRING);
       optional binary uid (STRING);
       optional group profiles (LIST) {
         repeated binary array (STRING);
       }
       required binary version (STRING);
     }
     required int64 time;
     optional int64 time_dt (TIMESTAMP(MILLIS,true));
   ```
   This is the schema after `ParquetSchemaUtil.addFallbackIds(fileSchema);`
   ```
   message union_cloudtrail {
     optional group metadata = 1 {
       optional group product {
         required binary version (STRING);
         required binary name (STRING);
         required binary vendor_name (STRING);
         optional group feature {
           required binary name (STRING);
         }
       }
       optional binary event_code (STRING);
       optional binary uid (STRING);
       optional group profiles (LIST) {
         repeated binary array (STRING);
       }
       required binary version (STRING);
     }
     required int64 time = 2;
     optional int64 time_dt (TIMESTAMP(MILLIS,true)) = 3;
   ```
   
   Should the `ParquetSchemaUtil.addFallbackIds(fileSchema);` method maybe create IDs for structs deeper in the hierarchy, too?
   
   ### Willingness to contribute
   
   - [ ] I can contribute a fix for this bug independently
   - [X] I would be willing to contribute a fix for this bug with guidance from the Iceberg community
   - [ ] I cannot contribute a fix for this bug at this time


-- 
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: issues-unsubscribe@iceberg.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Reading a table without schema IDs [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #11740:
URL: https://github.com/apache/iceberg/issues/11740#issuecomment-2954354824

   This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Reading a table without schema IDs [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #11740:
URL: https://github.com/apache/iceberg/issues/11740#issuecomment-2994562348

   This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org


Re: [I] Reading a table without schema IDs [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #11740: Reading a table without schema IDs
URL: https://github.com/apache/iceberg/issues/11740


-- 
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: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org