Kino1994 opened a new pull request, #87: URL: https://github.com/apache/impala/pull/87
## Summary - The SQL parser only accepted `<` and `<=` operators in Kudu 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 statements (`CREATE TABLE`, `ALTER TABLE ADD/DROP RANGE PARTITION`). - Adds `>` and `>=` alternatives to the `opt_lower_range_val` and `opt_upper_range_val` grammar rules, with a new `RangeBound` class carrying a `reversed` flag so bounds are normalized (swapped to the correct semantic position) during AST construction. - Both reversed and canonical forms now produce identical internal `RangePartition` representations, ensuring consistent behavior across DDL input, internal representation, and `SHOW RANGE PARTITIONS` display output. ## Test plan - [ ] New parser tests in `ParserTest.java` verify `VALUES >= expr`, `VALUES > expr`, `expr >= VALUES`, `expr > VALUES` parse successfully for `CREATE TABLE`, `ALTER TABLE ADD`, and `ALTER TABLE DROP` with single and multi-column tuples. - [ ] New analyzer tests in `AnalyzeKuduDDLTest.java` verify reversed forms pass full semantic analysis against Kudu table definitions. - [ ] Existing parser and analyzer tests continue to pass, confirming backward compatibility. - [ ] Manual verification that `ALTER TABLE t ADD RANGE PARTITION VALUES >= '2027-01-01'` and `ALTER TABLE t ADD RANGE PARTITION '2027-01-01' <= VALUES` produce identical partitions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
