mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
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 <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
committed by
Impala Public Jenkins
parent
685745f785
commit
6cf21464b4
@@ -358,6 +358,10 @@ class TestHdfsQueries(ImpalaTestSuite):
|
||||
def test_file_partitions(self, vector):
|
||||
self.run_test_case('QueryTest/hdfs-partitions', vector)
|
||||
|
||||
def test_partition_pruning(self, vector, unique_database):
|
||||
self.run_test_case('QueryTest/hdfs-partition-pruning',
|
||||
vector, unique_database)
|
||||
|
||||
|
||||
class TestPartitionKeyScans(ImpalaTestSuite):
|
||||
"""Tests for queries that exercise partition key scan optimisation. These
|
||||
|
||||
Reference in New Issue
Block a user