ignite-3 icon indicating copy to clipboard operation
ignite-3 copied to clipboard

IGNITE-25818: Sql. Bump calcite version to 1.41

Open lowka opened this issue 1 month ago • 0 comments

Updates calcite to 1.41

Unsigned int types

  • Excludes unsigned integer types in some tests (since these types are not supported by apache ignite).
  • We do not need to update SqlValidator since these types are not supported by the parser.

Workaround for incorrect CAST in convertValues

  • PR with unsigned types added an incorrect CAST to convertValues in the SQLToRelConvert and broke NOT NULL constraints. (https://issues.apache.org/jira/browse/CALCITE-1466)

Workaround for incorrect check in the SQLToRelConvert for UPDATE

  • The fix for https://issues.apache.org/jira/browse/CALCITE-7220 didn't take into account virtual columns.

Workaround for RexUtil.isLosslessCast(REAL, FLOAT) = true it was false before

  • RexUtil.isLosslessCast(REAL, FLOAT) is false in 1.40 but it was changed to true in 1.41. Updated RexUtils to preserve correctness of OutOfRangeLiteralComparisonReductionShuttle. The changes isLosslessCast to was introduced in https://issues.apache.org/jira/browse/CALCITE-7174.

RexSimply now converts AND/ORs to SEARCH

  • Updates plan serialisation check in Planner test to expand SEARCH operand.
  • Updates RelJson to expand ONLY SEARCH operator as RexUtil expandSearch tries to do other transformations stuff as well.
  • Updates tpc-h/tpc-ds and other tests to reflect that change.

TableScan(condition=false) is not converted to Values(tuples=[])

  • Before 1.41 empty scans, scans with condition = false), were successfully converted to Values(tuples=[]), but 1.41 broke this optimisation in some cases.

Referencing aliases in GROUP BY clause is now possible

  • Query: SELECT 1 AS k, SUM(i) FROM integers GROUP BY k+1 ORDER BY 2. Support MySQL-style non-standard GROUP BY (https://issues.apache.org/jira/browse/CALCITE-7189)

https://issues.apache.org/jira/browse/IGNITE-25818


Thank you for submitting the pull request.

To streamline the review process of the patch and ensure better code quality we ask both an author and a reviewer to verify the following:

The Review Checklist

  • [ ] Formal criteria: TC status, codestyle, mandatory documentation. Also make sure to complete the following:
    - There is a single JIRA ticket related to the pull request.
    - The web-link to the pull request is attached to the JIRA ticket.
    - The JIRA ticket has the Patch Available state.
    - The description of the JIRA ticket explains WHAT was made, WHY and HOW.
    - The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
  • [ ] Design: new code conforms with the design principles of the components it is added to.
  • [ ] Patch quality: patch cannot be split into smaller pieces, its size must be reasonable.
  • [ ] Code quality: code is clean and readable, necessary developer documentation is added if needed.
  • [ ] Tests code quality: test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.

Notes

lowka avatar Dec 16 '25 14:12 lowka