Zoltan Borok-Nagy has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/25195


Change subject: IMPALA-15638: Don't fail Iceberg scans on invalid UTF-8 bounds
......................................................................

IMPALA-15638: Don't fail Iceberg scans on invalid UTF-8 bounds

Parquet files written without the UTF8 annotation store strings as
plain BINARY. When such files are migrated to Iceberg, their bounds are
truncated to 16 bytes, possibly in the middle of a multi-byte
character. When a predicate on such a column was pushed down, Iceberg
failed to decode the bound, and the query failed with
"RuntimeIOException: Failed to decode value as UTF-8".

If planFiles() fails this way, IcebergScanPlanner now plans the scan
again without pushing down the predicates.

The Calcite planner decides to use the count star optimization before
that, assuming that the predicates are pushed down. A precondition
check makes such scans fail instead of returning a wrong count if the
predicates can't be pushed down.

Testing:
 - Added an EE test with a migrated table.

Change-Id: I94cd94633d009d5c8d6130930dc8f86390e96a34
Assisted-by: Claude Opus 5.5 (Claude Code)
---
M fe/src/main/java/org/apache/impala/planner/IcebergScanPlanner.java
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/rel/node/ImpalaHdfsScanRel.java
M 
testdata/workloads/functional-query/queries/QueryTest/iceberg-migrated-tables.test
3 files changed, 77 insertions(+), 2 deletions(-)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I94cd94633d009d5c8d6130930dc8f86390e96a34
Gerrit-Change-Number: 25195
Gerrit-PatchSet: 1
Gerrit-Owner: Zoltan Borok-Nagy <[email protected]>
Gerrit-Reviewer: Arnab Karmakar <[email protected]>

Reply via email to