Hello Steve Carlin, Michael Smith,

I'd like you to do a code review. Please visit

    http://gerrit.cloudera.org:8080/25238

to review the following change.


Change subject: IMPALA-15700: Calcite planner: check DATE units
......................................................................

IMPALA-15700: Calcite planner: check DATE units

Reject sub-day intervals on DATE during Calcite validation, matching
Original analysis before logical optimization. Keep calendar intervals,
TIMESTAMP arithmetic and integer DATE_ADD calls valid.

Add direct validation and conversion tests for operators, DATE_ADD,
DATE_SUB, reversed addition, variable intervals and zero literals.
Native conversion already rejects the tested invalid runtime cases;
this change closes the earlier validation gap.

Testing: 4 focused tests passed, covering 82 expressions; 2 methods fail
on the baseline. All 88 runtime value/rejection controls passed across
both planners with codegen on/off. Baseline runtime controls also pass.

Change-Id: I893573f2db1538490cf0f6c12b275c705366263d
Assisted-by: gpt-6.1-sol
---
M 
java/calcite-planner/src/main/java/org/apache/impala/calcite/service/ImpalaSqlValidatorImpl.java
A 
java/calcite-planner/src/test/java/org/apache/impala/calcite/service/CalciteDateIntervalTest.java
2 files changed, 185 insertions(+), 0 deletions(-)



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I893573f2db1538490cf0f6c12b275c705366263d
Gerrit-Change-Number: 25238
Gerrit-PatchSet: 1
Gerrit-Owner: Aleksandr Efimov <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>
Gerrit-Reviewer: Steve Carlin <[email protected]>

Reply via email to