You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Peter Rozsa (Code Review)" <ge...@cloudera.org> on 2025/11/21 14:44:19 UTC

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Peter Rozsa has uploaded this change for review. ( http://gerrit.cloudera.org:8080/23706


Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................

IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

This fixes an IllegalStateException in HdfsPartitionPruner when
evaluating 'IN' predicates with mismatched types.

Previously, 'canEvalUsingPartitionMd' did not check if the slot type
matched the literal type. This caused the frontend to attempt invalid
comparisons via 'LiteralExpr.compareTo', leading to
IllegalStateException or incorrect pruning.

The fix ensures 'canEvalUsingPartitionMd' returns false on type
mismatches, deferring evaluation to the backend where proper casting
occurs.

Testing:
- Added regression test in hdfs-partition-pruning.test.

Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
---
M fe/src/main/java/org/apache/impala/planner/HdfsPartitionPruner.java
A testdata/workloads/functional-query/queries/QueryTest/hdfs-partition-pruning.test
M tests/query_test/test_queries.py
3 files changed, 21 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/06/23706/2
-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 2
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 8: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 8
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pr...@cloudera.com>
Gerrit-Comment-Date: Wed, 26 Nov 2025 09:32:56 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 5:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21018/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 5
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pr...@cloudera.com>
Gerrit-Comment-Date: Mon, 24 Nov 2025 14:23:51 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 9:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12722/ DRY_RUN=false


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 9
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pr...@cloudera.com>
Gerrit-Comment-Date: Wed, 26 Nov 2025 21:50:54 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 3: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 3
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Fri, 21 Nov 2025 19:52:44 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Csaba Ringhofer (Code Review)" <ge...@cloudera.org>.
Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 5: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 5
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pr...@cloudera.com>
Gerrit-Comment-Date: Mon, 24 Nov 2025 15:08:25 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 9: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 9
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pr...@cloudera.com>
Gerrit-Comment-Date: Wed, 26 Nov 2025 21:50:53 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 9: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 9
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pr...@cloudera.com>
Gerrit-Comment-Date: Thu, 27 Nov 2025 02:48:27 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 8:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12719/ DRY_RUN=false


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 8
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pr...@cloudera.com>
Gerrit-Comment-Date: Wed, 26 Nov 2025 09:32:57 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 3:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12707/ DRY_RUN=false


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 3
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Fri, 21 Nov 2025 15:14:33 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 7:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12715/ DRY_RUN=false


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 7
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pr...@cloudera.com>
Gerrit-Comment-Date: Tue, 25 Nov 2025 16:02:23 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 7: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 7
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pr...@cloudera.com>
Gerrit-Comment-Date: Tue, 25 Nov 2025 16:02:23 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 6: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 6
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pr...@cloudera.com>
Gerrit-Comment-Date: Tue, 25 Nov 2025 08:22:45 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 7: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/12715/


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 7
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pr...@cloudera.com>
Gerrit-Comment-Date: Tue, 25 Nov 2025 21:02:52 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 8: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/12719/


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 8
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pr...@cloudera.com>
Gerrit-Comment-Date: Wed, 26 Nov 2025 14:29:39 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Peter Rozsa (Code Review)" <ge...@cloudera.org>.
Peter Rozsa has uploaded a new patch set (#4). ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................

IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

This fixes an IllegalStateException in HdfsPartitionPruner when
evaluating 'IN' predicates with mismatched types.

Previously, 'canEvalUsingPartitionMd' did not check if the slot type
matched the literal type. This caused the frontend to attempt invalid
comparisons via 'LiteralExpr.compareTo', leading to
IllegalStateException or incorrect pruning.

The fix ensures 'canEvalUsingPartitionMd' returns false on type
mismatches, deferring evaluation to the backend where proper casting
occurs.

Testing:
- Added regression test in hdfs-partition-pruning.test.

Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
---
M fe/src/main/java/org/apache/impala/planner/HdfsPartitionPruner.java
A testdata/workloads/functional-query/queries/QueryTest/hdfs-partition-pruning.test
M tests/query_test/test_queries.py
3 files changed, 24 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/06/23706/4
-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 4
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 2:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21013/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 2
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Fri, 21 Nov 2025 15:11:26 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 3:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12708/ DRY_RUN=true


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 3
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Fri, 21 Nov 2025 15:14:46 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 6:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/12714/ DRY_RUN=false


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 6
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pr...@cloudera.com>
Gerrit-Comment-Date: Tue, 25 Nov 2025 08:22:46 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................

IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

This fixes an IllegalStateException in HdfsPartitionPruner when
evaluating 'IN' predicates whose consist of two compatible types, for
example DATE and STRING: date_col in (<date as string>).

Previously, 'canEvalUsingPartitionMd' did not check if the slot type
matched the literal type. This caused the frontend to attempt invalid
comparisons via 'LiteralExpr.compareTo', leading to
IllegalStateException or incorrect pruning.

The fix ensures 'canEvalUsingPartitionMd' returns false on type
mismatches, deferring evaluation to the backend where proper casting
occurs.

Testing:
- Added regression test in hdfs-partition-pruning.test.

Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Reviewed-on: http://gerrit.cloudera.org:8080/23706
Reviewed-by: Impala Public Jenkins <im...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M fe/src/main/java/org/apache/impala/planner/HdfsPartitionPruner.java
A testdata/workloads/functional-query/queries/QueryTest/hdfs-partition-pruning.test
M tests/query_test/test_queries.py
3 files changed, 24 insertions(+), 0 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 10
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pr...@cloudera.com>

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 4:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/21016/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 4
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Mon, 24 Nov 2025 10:08:13 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Csaba Ringhofer (Code Review)" <ge...@cloudera.org>.
Csaba Ringhofer has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 4: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/23706/4//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/23706/4//COMMIT_MSG@10
PS4, Line 10: redicates with mismatched types.
This only happens in case when the predicate comes through an equi join, right? Or at least this is what the test suggests. My assumption is that in normal cases implicit casting somehow takes care of this.

I don't want to block this, but it would be nice to make the circumstances when this can happen clear in the commit message.



-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 4
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Comment-Date: Mon, 24 Nov 2025 12:33:07 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Peter Rozsa (Code Review)" <ge...@cloudera.org>.
Peter Rozsa has uploaded a new patch set (#5). ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................

IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

This fixes an IllegalStateException in HdfsPartitionPruner when
evaluating 'IN' predicates whose consist of two compatible types, for
example DATE and STRING: date_col in (<date as string>).

Previously, 'canEvalUsingPartitionMd' did not check if the slot type
matched the literal type. This caused the frontend to attempt invalid
comparisons via 'LiteralExpr.compareTo', leading to
IllegalStateException or incorrect pruning.

The fix ensures 'canEvalUsingPartitionMd' returns false on type
mismatches, deferring evaluation to the backend where proper casting
occurs.

Testing:
- Added regression test in hdfs-partition-pruning.test.

Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
---
M fe/src/main/java/org/apache/impala/planner/HdfsPartitionPruner.java
A testdata/workloads/functional-query/queries/QueryTest/hdfs-partition-pruning.test
M tests/query_test/test_queries.py
3 files changed, 24 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/06/23706/5
-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 5
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pr...@cloudera.com>

[Impala-ASF-CR] IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/23706 )

Change subject: IMPALA-14569: Fix IllegalStateException in partition pruning on type mismatch
......................................................................


Patch Set 6: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/12714/


-- 
To view, visit http://gerrit.cloudera.org:8080/23706
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Idc226a628c8df559329a060cb963b81e27e21eda
Gerrit-Change-Number: 23706
Gerrit-PatchSet: 6
Gerrit-Owner: Peter Rozsa <pr...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <cs...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Peter Rozsa <pr...@cloudera.com>
Gerrit-Comment-Date: Tue, 25 Nov 2025 13:21:26 +0000
Gerrit-HasComments: No