Arnab Karmakar has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/24045


Change subject: IMPALA-14737 Part2: Add relaxed predicate pushdown for LIKE 
patterns with suffix
......................................................................

IMPALA-14737 Part2: Add relaxed predicate pushdown for LIKE patterns with suffix

Part 1 (committed as 540a3784e) added basic LIKE predicate pushdown
to Iceberg for simple prefix patterns ('abc%'), exact matches ('exact'),
and escaped wildcards ('asd\\%'). Patterns with literal content after
wildcards (e.g., 'prefix%suffix', 'd%d') were rejected and not pushed
down at all.

This Part 2 patch enhances the implementation with "relaxed predicate pushdown"
for patterns with suffix. Instead of rejecting these patterns completely, we 
now:

1. Push down a relaxed prefix predicate to Iceberg (e.g., startsWith('prefix'))
   for partition/file pruning
2. Retain the full LIKE predicate (e.g., LIKE 'prefix%suffix') in the scan node
   for Impala to evaluate on the surviving rows

This provides significant performance benefits by leveraging Iceberg's 
file/partition
filtering while maintaining query correctness.

Example behavior for `LIKE 'd%d'`:
- Before: Pattern rejected, all 3/3 partitions scanned, no pruning benefit
- After: startsWith('d') pushed to Iceberg -> 1/3 partitions, full LIKE 'd%d'
        evaluated by Impala on surviving rows -> correct results

Testing:
- Updated iceberg-like-pushdown.test with relaxed predicate tests
- Verified partition pruning works as it scans only a subset of files

Change-Id: I97c11362f098507fa440eafde3c35bbc6d7092b3
---
M fe/src/main/java/org/apache/impala/common/IcebergPredicateConverter.java
M fe/src/main/java/org/apache/impala/planner/IcebergScanPlanner.java
M 
testdata/workloads/functional-planner/queries/PlannerTest/iceberg-predicates.test
M 
testdata/workloads/functional-query/queries/QueryTest/iceberg-like-pushdown.test
4 files changed, 80 insertions(+), 19 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/45/24045/1
--
To view, visit http://gerrit.cloudera.org:8080/24045
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I97c11362f098507fa440eafde3c35bbc6d7092b3
Gerrit-Change-Number: 24045
Gerrit-PatchSet: 1
Gerrit-Owner: Arnab Karmakar <[email protected]>

Reply via email to