You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "770120041 (via GitHub)" <gi...@apache.org> on 2026/03/09 00:34:50 UTC
[PR] Core: Fix ValidationException when filtering identity-partitioned field with transforms [iceberg]
770120041 opened a new pull request, #15550:
URL: https://github.com/apache/iceberg/pull/15550
## Summary
Fix `ValidationException` that occurs when filtering an identity-partitioned timestamp field using a different transform (e.g., `hours()`). The issue was caused by attempting to cast the integer transform result directly to the source column's timestamp type.
Fixes #15502
--
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: [PR] Core: Fix ValidationException when filtering identity-partitioned field with transforms [iceberg]
Posted by "ldudas-marx (via GitHub)" <gi...@apache.org>.
ldudas-marx commented on code in PR #15550:
URL: https://github.com/apache/iceberg/pull/15550#discussion_r2906972624
##########
api/src/main/java/org/apache/iceberg/transforms/Identity.java:
##########
@@ -146,6 +147,10 @@ public UnboundPredicate<T> project(String name, BoundPredicate<T> predicate) {
@Override
public UnboundPredicate<T> projectStrict(String name, BoundPredicate<T> predicate) {
+ if (predicate.term() instanceof BoundTransform) {
+ return ProjectionUtil.projectTransformPredicate(this, name, predicate);
Review Comment:
ProjectionUtil.projectTransformPredicate only projects the predicate if it's term has the same transform, in all other cases returns null. Identity transform in a predicate doesn't make too much sense. So I guess this will almost always return null.
I think the best would return "unbound" version of the predicate so it can be pushed down. Unfortunately the current expression visitors not fully support non-reference terms so the original issue in the query will be also broken.
So my suggestion would be to just return null to show that this use case is not really supported.
--
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: [PR] Core: Fix ValidationException when filtering identity-partitioned field with transforms [iceberg]
Posted by "zheliu2 (via GitHub)" <gi...@apache.org>.
zheliu2 commented on code in PR #15550:
URL: https://github.com/apache/iceberg/pull/15550#discussion_r2907042031
##########
api/src/main/java/org/apache/iceberg/transforms/Identity.java:
##########
@@ -146,6 +147,10 @@ public UnboundPredicate<T> project(String name, BoundPredicate<T> predicate) {
@Override
public UnboundPredicate<T> projectStrict(String name, BoundPredicate<T> predicate) {
+ if (predicate.term() instanceof BoundTransform) {
+ return ProjectionUtil.projectTransformPredicate(this, name, predicate);
Review Comment:
Thanks @ldudas-marx, that makes sense — since the identity transform will never match the predicate's transform, `projectTransformPredicate` would always return null here anyway. Updated to return `null` directly to make the intent clearer.
--
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: [PR] Core: Fix ValidationException when filtering identity-partitioned field with transforms [iceberg]
Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao closed pull request #15550: Core: Fix ValidationException when filtering identity-partitioned field with transforms
URL: https://github.com/apache/iceberg/pull/15550
--
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: [PR] Core: Fix ValidationException when filtering identity-partitioned field with transforms [iceberg]
Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao commented on code in PR #15550:
URL: https://github.com/apache/iceberg/pull/15550#discussion_r2903108698
##########
api/src/main/java/org/apache/iceberg/transforms/Identity.java:
##########
@@ -141,11 +142,19 @@ public boolean satisfiesOrderOf(Transform<?, ?> other) {
@Override
public UnboundPredicate<T> project(String name, BoundPredicate<T> predicate) {
+ if (predicate.term() instanceof BoundTransform) {
+ return ProjectionUtil.projectTransformPredicate(this, name, predicate);
+ }
Review Comment:
nit: is this redundant? Since project() delegates to projectStrict(), the check here isn't strictly needed.
--
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: [PR] Core: Fix ValidationException when filtering identity-partitioned field with transforms [iceberg]
Posted by "770120041 (via GitHub)" <gi...@apache.org>.
770120041 commented on code in PR #15550:
URL: https://github.com/apache/iceberg/pull/15550#discussion_r2905878229
##########
api/src/main/java/org/apache/iceberg/transforms/Identity.java:
##########
@@ -141,11 +142,19 @@ public boolean satisfiesOrderOf(Transform<?, ?> other) {
@Override
public UnboundPredicate<T> project(String name, BoundPredicate<T> predicate) {
+ if (predicate.term() instanceof BoundTransform) {
+ return ProjectionUtil.projectTransformPredicate(this, name, predicate);
+ }
Review Comment:
Thanks for the review @huaxingao ! yes I think it was not needed and just removed in the next revision, thanks!
--
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: [PR] Core: Fix ValidationException when filtering identity-partitioned field with transforms [iceberg]
Posted by "huaxingao (via GitHub)" <gi...@apache.org>.
huaxingao commented on PR #15550:
URL: https://github.com/apache/iceberg/pull/15550#issuecomment-4028819573
This PR appears to be generated and submitted by AI without human review. Closing for now.
--
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