You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "shivdeep-singh3 (via GitHub)" <gi...@apache.org> on 2025/03/10 06:57:28 UTC
[I] Partition Pruning not working with different data type [iceberg]
shivdeep-singh3 opened a new issue, #12491:
URL: https://github.com/apache/iceberg/issues/12491
### Apache Iceberg version
1.6.1
### Query engine
Spark
### Please describe the bug 🐞
When querying iceberg table on a partitioned column, the partition pruning only works when the data type of the partition column and the filter matches-
Table create statement-
`spark.sql("""CREATE TABLE adhoc_ttl_15days.test_ice_table (entityid STRING, day string) USING iceberg PARTITIONED BY (day) LOCATION 'gs://bucket/loc1' TBLPROPERTIES ( 'engine.hive.enabled' = 'true', 'engine.hive.lock-enabled' = 'false', 'format' = 'iceberg/parquet', 'format-version' = '2', 'write.format.default' = 'parquet', 'write.parquet.compression-codec' = 'gzip')
| """)`
Query on partition column with string value-
<img width="1414" alt="Image" src="https://github.com/user-attachments/assets/dc7ebb30-e0cb-405b-9f71-6847be5d0d65" />
Query on partition column with int value-
<img width="1390" alt="Image" src="https://github.com/user-attachments/assets/71e55922-cadb-4c2b-9f4c-2ea762b2638b" />
In the case of int filter value, entire data is being scanned.
Spark Version- 3.5.2
### 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
- [x] 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] Partition Pruning not working with different data type [iceberg]
Posted by "RussellSpitzer (via GitHub)" <gi...@apache.org>.
RussellSpitzer commented on issue #12491:
URL: https://github.com/apache/iceberg/issues/12491#issuecomment-2722819518
@hussein-awala is right, we can't actually do anything to fix that within Iceberg, because what is being highlighted in the example above is Spark itself saying "I don't have any predicates which can be pushed down to the underlying datasource". So by the time the predicates get to the Iceberg Library they are already gone.
--
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] Partition Pruning not working with different data type [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #12491: Partition Pruning not working with different data type
URL: https://github.com/apache/iceberg/issues/12491
--
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] Partition Pruning not working with different data type [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #12491:
URL: https://github.com/apache/iceberg/issues/12491#issuecomment-3325968084
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] Partition Pruning not working with different data type [iceberg]
Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala commented on issue #12491:
URL: https://github.com/apache/iceberg/issues/12491#issuecomment-2722803188
As far as I know, when we compare two columns, one of type string and the other of type integer, Spark (unfortunately) casts the string column to integer, and here is a PR that tried to fix the issue: https://github.com/apache/spark/pull/47246
I wonder if this behavior should be updated/fixed by Iceberg or not 🤔
--
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] Partition Pruning not working with different data type [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #12491:
URL: https://github.com/apache/iceberg/issues/12491#issuecomment-3272742295
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