mbutrovich opened a new issue, #7838: URL: https://github.com/apache/datafusion-comet/issues/7838
### What is the problem the feature request solves? The native Iceberg scan leaves `IS NULL` and `IS NOT NULL` on array, map, and struct columns out of the residual it passes to iceberg-rust ([`CometIcebergNativeScan.scala`](https://github.com/apache/datafusion-comet/blob/cebb41acb2f420e3e624dbf8a69acc5ce414edbb/spark/src/main/scala/org/apache/comet/serde/operator/CometIcebergNativeScan.scala#L944-L949)), and #7575 does the same for Variant. iceberg-rust cannot bind these predicates (apache/iceberg-rust#3809). An unconvertible conjunct drops the whole residual ([`CometIcebergNativeScan.scala`](https://github.com/apache/datafusion-comet/blob/cebb41acb2f420e3e624dbf8a69acc5ce414edbb/spark/src/main/scala/org/apache/comet/serde/operator/CometIcebergNativeScan.scala#L964-L980)), so the other conjuncts lose row-group and page pruning. Spark infers `isnotnull(data)` from a predicate such as `try_variant_get(data, '$.num', 'int') > 30`, and Iceberg includes it in the residual, so most filters on a Variant field hit this. The post-scan filter still applies the whole predicate, so results are correct. ### Describe the potential solution Once Comet's iceberg-rust dependency includes the fix for apache/iceberg-rust#3809, serialize these null checks like the ones on primitive columns. Keep the other predicates on these columns out of the residual. Add a test that checks a residual such as `data IS NOT NULL AND id > 5` reaches the native scan and prunes row groups by `id`. ### Willingness to contribute 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: [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]
