fix(e6): quote reserved-word keys in Databricks colon path access - #286
Merged
tkaunlaky-e6 merged 1 commit intoJul 30, 2026
Merged
Conversation
E6's colon-path grammar accepts only a non-reserved identifier after ':',
so a bare reserved word such as `col:limit` fails to parse ("Encountered
':'"). The e6 generator only quoted RESERVED_DATATYPE_KEYWORDS (25 datatype
names), leaving the other E6 reserved words (LIMIT, FROM, ORDER, ...) bare.
Widen the colon-key quoting check in _render_variant_colon and
json_extract_sql to the full RESERVED_KEYWORDS set, emitting col:"limit".
Non-reserved keys are unchanged (stay bare); datatype keys keep working.
Validated against the live E6/Calcite engine: col:"limit" parses natively
while col:limit does not. Fixes the "Parse: Databricks colon accessor"
failure bucket (all observed cases are Properties:limit).
gauravdawar-e6
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Databricks colon path access on a reserved-word key — e.g.
Properties:limit— fails to transpile to valid E6. E6's colon-path grammar accepts only a non-reserved identifier after:, so a bare reserved word makes the E6/Calcite parser throwEncountered ":". The e6 generator only quotedRESERVED_DATATYPE_KEYWORDS(25 datatype names), leaving the other E6 reserved words (LIMIT,FROM,ORDER, …) bare.This is the "Parse: Databricks colon accessor" failure bucket — 90 queries in the TomTom migration run, all
Properties:limit.Fix
Widen the colon-key quoting check in
_render_variant_colonandjson_extract_sql(databricks branch) fromRESERVED_DATATYPE_KEYWORDSto also cover the fullRESERVED_KEYWORDSset, emittingcol:"limit". Non-reserved keys are unchanged (stay bare); datatype keys keep working.Validation
col:"limit"parses natively (0 transpiler fallbacks) while barecol:limitthrowsEncountered ":".SELECT Properties:limit→SELECT Properties:"limit"; the 13 non-reserved keys in the real query (country,area,custom_metrics_name, …) stay bare.test_e6.pysuite passes (59 tests / 896 subtests).Example