Hello Zoltan Borok-Nagy, Impala Public Jenkins,
I'd like you to reexamine a change. Please visit
http://gerrit.cloudera.org:8080/24095
to look at the new patch set (#2).
Change subject: IMPALA-7618: Accept reversed comparators (> / >=) in range
partition bounds
......................................................................
IMPALA-7618: Accept reversed comparators (> / >=) in range partition bounds
The SQL parser only accepted '<' and '<=' operators in range partition
bounds, rejecting logically equivalent forms like 'VALUES >= X' and
'X > VALUES'. This created an inconsistency where SHOW RANGE PARTITIONS
displayed bounds using '>=' notation that couldn't be used in DDL.
Fix the parser grammar to accept '>' and '>=' in both opt_lower_range_val
and opt_upper_range_val. A new RangeBound class with a Comparator enum
(LESS_THAN, LESS_EQUAL, GREATER_THAN, GREATER_EQUAL) carries the
operator so that createFromRangeWithNormalization() can swap bounds into
their correct semantic positions before constructing the RangePartition.
Both forms now produce identical internal representations.
Change-Id: Ia12668537bfc72cc9399a60f68ca7608422b35c2
Generated-by: Claude Opus 4.6
---
M fe/src/main/cup/sql-parser.cup
A fe/src/main/java/org/apache/impala/analysis/RangeBound.java
M fe/src/main/java/org/apache/impala/analysis/RangePartition.java
M fe/src/test/java/org/apache/impala/analysis/AnalyzeKuduDDLTest.java
M fe/src/test/java/org/apache/impala/analysis/ParserTest.java
5 files changed, 172 insertions(+), 27 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/95/24095/2
--
To view, visit http://gerrit.cloudera.org:8080/24095
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ia12668537bfc72cc9399a60f68ca7608422b35c2
Gerrit-Change-Number: 24095
Gerrit-PatchSet: 2
Gerrit-Owner: Anonymous Coward <[email protected]>
Gerrit-Reviewer: Anonymous Coward <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]>