Skip to content

[Backward Incompatible]Calcite 1.37 → 1.39 bump introduces new reserved keywords & bracket-modifier syntax changes #16295

@praveenc7

Description

@praveenc7

Background

Pinot now ships with Calcite 1.39 (via #15263 · #15615 · #15942).
While build-breaking API shifts are easy to catch, some parser changes don’t surface until user queries start failing.
This issue documents the backwards-incompatible deltas introduced since Calcite 1.37, summarizes user impact


Affected Versions

Component Old New Introduced by
Calcite 1.37 1.39 #15263
(merged 2025-04-24)
1.39 1.40 #15942
(merged 2025-05-29)
Parser tweaks #15615
(merged 2025-04-28)

Any Pinot build after 2025-04-24 contains the changes below.


🚨 Breaking / Incompatible Changes

Category Detail Before (✅) After (❌ then ✅)
New reserved keywords ASOF, VARIANT, UUID, MATCH_CONDITION, MEASURE are now keywords. Must be double-quoted when used as identifiers. SELECT VARIANT FROM t; SELECT VARIANT FROM t;
SELECT "VARIANT" FROM t;
Bracket modifiers require parentheses OFFSET, ORDINAL, SAFE_OFFSET, SAFE_ORDINAL now must wrap the argument in (). arr[OFFSET 3] arr[OFFSET 3]
arr[OFFSET(3)]

🔍 Reproduction

-- fails on Calcite 1.39+
SELECT VARIANT FROM events;

-- fails on Calcite 1.39+
SELECT arr[OFFSET 1] FROM my_table;

Error
org.apache.calcite.sql.parser.SqlParseException:
Encountered "VARIANT" at line 1, column 8.
Was expecting one of: <expression> ...

cc : UOETianleZhang who did the investigation

Impact

We saw multiple tables using keywords like variant saw queries failing because of this incompatible change and caused a incident for us at Linkedin.

Tagging the original author : @yashmayya

Metadata

Metadata

Assignees

No one assigned

    Labels

    backward-incompatReferenced by PRs that introduce or fix backward compat issuesquery

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions