You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "JFinis (via GitHub)" <gi...@apache.org> on 2024/02/20 19:03:03 UTC
[I] truncate partitioning underflows, leads to wrong results [iceberg]
JFinis opened a new issue, #9767:
URL: https://github.com/apache/iceberg/issues/9767
### Apache Iceberg version
1.4.3 (latest release)
### Query engine
Spark
### Please describe the bug 🐞
The truncate partition transform can underflow for all numeric types (decimal, int, long), leading to it no longer being order preservering. I.e., a very small value gets assigned to a very large bucket, leading to partition pruning incorrectly pruning this bucket and therefore queries to return wrong results.
Also, due to the underflow, the bucket is not even a correct bucket, as it is not a remainder of the truncate width.
For example, integer value -2147483648 with truncate width 10000 gets put into bucket 2147477296.
Spark SQL repro:
```
CREATE TABLE iceberg.sample (x integer) PARTITIONED BY(truncate(x,10000))
TBLPROPERTIES(`format-version`=2);
INSERT INTO iceberg.sample VALUES(-2147483648);
-- Returns empty result, since the value is put into bucket 2147477296
SELECT * FROM iceberg.sample WHERE x < 0
```
I guess truncate partitioning should check for underflow and in this case put the value into the lowest possible bucket. The transform needs to be clarified in the specification as well.
--
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] truncate partitioning underflows, leads to wrong results [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #9767: truncate partitioning underflows, leads to wrong results
URL: https://github.com/apache/iceberg/issues/9767
--
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] truncate partitioning underflows, leads to wrong results [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #9767:
URL: https://github.com/apache/iceberg/issues/9767#issuecomment-2455962746
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] truncate partitioning underflows, leads to wrong results [iceberg]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #9767:
URL: https://github.com/apache/iceberg/issues/9767#issuecomment-2425313998
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