You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "edgarRd (via GitHub)" <gi...@apache.org> on 2023/03/16 01:59:24 UTC

[GitHub] [iceberg] edgarRd opened a new issue, #7122: Iceberg table in Hive fails with IndexOutOfBounds when BETWEEN filter used

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

   ### Apache Iceberg version
   
   1.1.0 (latest release)
   
   ### Query engine
   
   Hive
   
   ### Please describe the bug 🐞
   
   When using Hive `2.3.4` to read Iceberg tables, I've found cases where reads fail with:
   
   ```
   java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
     at java.util.ArrayList.rangeCheck(ArrayList.java:659)
     at java.util.ArrayList.get(ArrayList.java:435)
     at org.apache.iceberg.mr.hive.HiveIcebergFilterFactory.translateLeaf(HiveIcebergFilterFactory.java:111)
     at org.apache.iceberg.mr.hive.HiveIcebergFilterFactory.translate(HiveIcebergFilterFactory.java:82)
     at org.apache.iceberg.mr.hive.HiveIcebergFilterFactory.translate(HiveIcebergFilterFactory.java:76)
     at org.apache.iceberg.mr.hive.HiveIcebergFilterFactory.generateFilterExpression(HiveIcebergFilterFactory.java:53)
     at org.apache.iceberg.mr.hive.HiveIcebergInputFormat.getSplits(HiveIcebergInputFormat.java:90)
     at org.apache.hadoop.hive.ql.io.HiveInputFormat.addSplitsForGroup(HiveInputFormat.java:442)
     at org.apache.hadoop.hive.ql.io.HiveInputFormat.getSplits(HiveInputFormat.java:561)
     at org.apache.hadoop.hive.ql.exec.tez.HiveSplitGenerator.initialize(HiveSplitGenerator.java:196)
   ```
   
   My hypothesis is that Hive has run an optimization compacting leaves in the expression tree but the actual `tree` in the `SearchArguments` is not compacted to reflect this, leading to trying to access an index in the leaves that does not exist. This is possibly a bug in Hive (i.e. `tree` and `leaves` are not in-sync) but we can handle in Iceberg InputFormat by throwing `UnsupportedOperationException` avoiding the translation of the filter at all to pass down to Iceberg, the filter will later be applied by Hive, just like we handle other failure cases when converting `SearchArguments`.


-- 
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


[GitHub] [iceberg] pvary closed issue #7122: Iceberg table in Hive fails with IndexOutOfBounds when BETWEEN filter used

Posted by "pvary (via GitHub)" <gi...@apache.org>.
pvary closed issue #7122: Iceberg table in Hive fails with IndexOutOfBounds when BETWEEN filter used
URL: https://github.com/apache/iceberg/issues/7122


-- 
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