Skip to content

docs(core-spec): make expression language lists match the grammar and examples - #753

Open
ashlearnnext-star wants to merge 3 commits into
apache:mainfrom
ashlearnnext-star:docs/expression-language-consistency
Open

ashlearnnext-star wants to merge 3 commits into
apache:mainfrom
ashlearnnext-star:docs/expression-language-consistency

Conversation

@ashlearnnext-star

Copy link
Copy Markdown
Contributor

… examples

Editorial fixes in expression_language.md, no change to the language:

  • Precedence: add !=, ILIKE and IS DISTINCT FROM to the comparison level.
  • CAST types: list TIMESTAMP_NTZ, which the construction table already casts to.
  • Window frames: list ROWS BETWEEN n PRECEDING AND CURRENT ROW, used by the running-average example.
  • Standards Reference: drop CTEs, which expressions do not support.
  • Add a blank line so the "Fractional seconds" paragraph no longer renders as a heading.

Summary

Related Issues

Checklist

Specification

  • Spec changes are included in core-spec/ and follow the existing structure
  • Spec changes have a [DISCUSS] thread on dev@ with a stated end date, and reach lazy consensus (or pass a [VOTE]) before merge
  • Breaking changes to the spec are clearly called out in the summary
  • For a material spec change, docs/spec_changes.md records rationale, compatibility and migration impact, or the PR explains why no entry is needed

Ontology

  • Ontology changes in ontology/ are consistent with spec changes
  • New or modified terms are defined and documented

Converters

Validation

  • Validation rules in validation/ are updated if the spec changed
  • New validation cases are covered by tests

Documentation

  • docs/ is updated to reflect any user-facing changes
  • New features or behaviors are documented with examples where appropriate
  • CONTRIBUTING.md is updated if the contribution process changed

Examples

  • examples/ are added or updated for any new spec constructs

Tests

  • All existing tests pass (pytest / CI green)
  • New functionality is covered by tests

Compliance

  • ASF license headers are present on all new source files
  • New third-party dependencies follow Third-Party Dependencies
  • If third-party source code is vendored/copied (not just declared as a dependency), NOTICE and/or LICENSE have been updated per ASF policy

… examples

Editorial fixes in expression_language.md, no change to the language:

- Precedence: add !=, ILIKE and IS DISTINCT FROM to the comparison level.
- CAST types: list TIMESTAMP_NTZ, which the construction table already casts to.
- Window frames: list ROWS BETWEEN n PRECEDING AND CURRENT ROW, used by the
  running-average example.
- Standards Reference: drop CTEs, which expressions do not support.
- Add a blank line so the "Fractional seconds" paragraph no longer renders
  as a heading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the spec label Nov 18, 2026
@ashlearnnext-star ashlearnnext-star changed the title docs(core-spec): make expression language lists match the grammar docs(core-spec): make expression language lists match the grammar and examples Nov 18, 2026
@jbonofre
jbonofre self-requested a review November 24, 2026 13:05
jbonofre
jbonofre previously approved these changes Nov 24, 2026

@jbonofre jbonofre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM on the content, all five fixes accurately align core-spec/expression_language.md with the rest of the specification, the ANTLR4 grammar, and the compliance examples without changing language semantics.

Before merging, we should:

  • Rebase from main (and resolve conflicts)
  • Trim the 5. Comparison: line from 3 trailing spaces to 2 so it passes the trailing-whitespace pre-commit check.

…guage-consistency

# Conflicts:
#	core-spec/expression_language.md
@ashlearnnext-star

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @jbonofre. I merged main and fixed the conflict on the 5. Comparison: line, which now ends with two spaces. Pre-commit and the validator tests pass locally. Could a committer approve the workflow runs for this push?

This PR and #764 change neighbouring lines of the same file, so whichever merges second will need a small conflict fix. I'll take care of it.

…guage-consistency

# Conflicts:
#	core-spec/expression_language.md
@ashlearnnext-star

Copy link
Copy Markdown
Contributor Author

Resolved the conflict with #764; the diff is unchanged otherwise.

@MrBlack1995 MrBlack1995 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked the five edits on ed79b9f against core-spec/grammar/OssieExpression.g4 and the rest of the document, and all five hold:

  • Precedence: the grammar's NEQ token is '<>' | '!=', ILIKE shares the rule of LIKE, and IS [NOT] DISTINCT FROM is a predicate at the same level as the comparisons. The operator table further up already lists !=.
  • CAST types: the Date/Time Construction table already casts to TIMESTAMP_NTZ.
  • Window frames: the grammar's frame bound allows n PRECEDING with CURRENT ROW, which the running-average example uses.
  • Standards Reference: the unsupported-features table lists CTEs, so the bullet contradicted it.
  • The blank line before the rule is right, the paragraph rendered as a heading.

The branch merges into current main without a conflict. I did not run pre-commit or the test suite, since only the document changes.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants