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


Change subject: IMPALA-14660: Fix incorrect parameter validation in 
IcebergPartitionExpr
......................................................................

IMPALA-14660: Fix incorrect parameter validation in IcebergPartitionExpr

The validation condition at line 61 of IcebergPartitionExpr.java used
AND (&&) instead of OR (||), creating an impossible condition that
could never be true:
`if (params.size() > 2 && params.size() < 1)`

This allowed partition transforms with more than 2 arguments to pass
validation silently, with the extra parameters being ignored. The
correct condition should reject calls with less than 1 OR more than
2 parameters:
`if (params.size() < 1 || params.size() > 2)`

This bug affected all Iceberg partition transforms (truncate, bucket,
year, month, day, hour) since they share the same validation logic.

Change-Id: Iba0bbf349fa207cd59e04a276e8813546e5b5ea9
---
M fe/src/main/java/org/apache/impala/analysis/IcebergPartitionExpr.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeDDLTest.java
2 files changed, 3 insertions(+), 3 deletions(-)



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

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

Reply via email to