praveenc7 opened a new issue, #16295:
URL: https://github.com/apache/pinot/issues/16295

   ### Background  
   Pinot now ships with **Calcite 1.3** (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, and proposes follow-ups (docs, tooling, 
feature flags).
   
   ---
   
   ### Affected Versions
   
   | Component | Old | New | Introduced by |
   |-----------|-----|-----|---------------|
   | Calcite   | 1.37 | **1.39** | apache/pinot#15263 <br> (merged 2025-04-24) |
   |           | 1.39 | **1.40** | apache/pinot#15942 <br> (merged 2025-05-29) |
   | Parser tweaks | – | – | apache/pinot#15615 <br> (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;` ❌<br>`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]` ❌<br>`arr[OFFSET(3)]` ✅ |
   
   ---
   
   ### 🔍 Reproduction
   
   ```sql
   -- 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](https://github.com/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 


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to