Skip to content

Fix E6 interval syntax for nonliteral amounts - #344

Open
darpan-e6 wants to merge 2 commits into
mainfrom
codex/fix-e6-expression-interval-units
Open

darpan-e6 wants to merge 2 commits into
mainfrom
codex/fix-e6-expression-interval-units

Conversation

@darpan-e6

Copy link
Copy Markdown

Problem

The OneTrust Databricks view uses make_interval(0, 0, 0, 0, 0, UO.utcOffsetMinutes). The E6 renderer emits INTERVAL UO."utcOffsetMinutes" 'MINUTE', but the affected E6 planner's interval-expression grammar requires the bare qualifier MINUTE.

Change

  • Emit bare qualifiers for nonliteral interval amounts, preserving identifier quoting and literal forms such as INTERVAL '5 MINUTE'.
  • Parenthesize compound amounts, as required by the planner grammar, without adding another set of parentheses to an already wrapped expression.
  • Cover the qualified OneTrust-shaped reference and compound amounts in the E6 translation tests.

Validation

  • E6 and Databricks dialect suites: 95 tests passed.
  • Parse-only probe using the affected Calcite revision's interval grammar production: the old form was rejected; generated column, compound and literal forms parsed.
  • No customer queries were executed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant