Skip to content

docs(core-spec): extract dialect/tool function mappings to extensions/ - #764

Merged
christianeu-db merged 4 commits into
apache:mainfrom
ashlearnnext-star:fix-issue-641
Nov 25, 2026
Merged

christianeu-db merged 4 commits into
apache:mainfrom
ashlearnnext-star:fix-issue-641

Conversation

@ashlearnnext-star

@ashlearnnext-star ashlearnnext-star commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

core-spec/expression_language.md still had two blocks of vendor-specific mapping content: "Common Dialect Variations" (ANSI_SQL vs Snowflake, BigQuery, Databricks, PostgreSQL syntax) and "Cross-Reference: Tool Mappings" (Ossie functions vs Tableau, Looker Studio, DAX, and Sigma, across aggregation, date, string, conditional, and window functions).

Per #617's vendor-neutral core spec principle, this kind of per-tool reference belongs in extensions/, not in the normative spec. Moves both blocks verbatim into a new extensions/function_mappings.md, replacing them in expression_language.md with a pointer. Lists the new file in extensions/README.md's contents table.

No other file referenced the moved section headings, so this does not break any cross-reference.

Closes #641.

Maintainer note: built off of @arnavshah038-jpg's #644

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

core-spec/expression_language.md still had two blocks of vendor-specific
mapping content: "Common Dialect Variations" (ANSI_SQL vs Snowflake,
BigQuery, Databricks, PostgreSQL syntax) and "Cross-Reference: Tool
Mappings" (Ossie functions vs Tableau, Looker Studio, DAX, and Sigma,
across aggregation, date, string, conditional, and window functions).

Per apache#617's vendor-neutral core spec principle, this kind of per-tool
reference belongs in extensions/, not in the normative spec. Moves both
blocks verbatim into a new extensions/function_mappings.md, replacing
them in expression_language.md with a pointer. Lists the new file in
extensions/README.md's contents table.

No other file referenced the moved section headings, so this does not
break any cross-reference.

Closes apache#641.
@github-actions github-actions Bot added the spec label Nov 18, 2026
@ashlearnnext-star
ashlearnnext-star marked this pull request as ready for review November 18, 2026 19:10

@christianeu-db christianeu-db 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.

Thanks for this cleanup @ashlearnnext-star, this is an important step towards continued vendor neutrality!

Beyond the comments, one thing to under overview is to call out this doc is focused on a portable Ossie dialect. It's also possible to carry along non-portable dialects. For more info on how they fit into the spec and can be mapped from the portable dialect, see

Comment thread core-spec/expression_language.md Outdated
Comment on lines 840 to 846

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.

can these vendor references be moved as well (SQL standard above is fine since it's the basis of Ossie SQL)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 621d442: SQL:2003 stays; the vendor and BI-tool references moved to a References section in extensions/function_mappings.md.

Comment thread core-spec/expression_language.md Outdated
Comment on lines 795 to 803

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.

These should also be extracted

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 621d442: the native-defaults table moved to extensions/function_mappings.md#null-ordering-defaults-by-engine. I also moved the Snowflake/DuckDB session-setting example and replaced the MySQL example with a neutral one, so this section names no vendors.

Comment thread core-spec/expression_language.md Outdated
Comment on lines 227 to 234

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.

This should be extracted

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 621d442: the engine-support table and the BigQuery note moved to extensions/function_mappings.md#approximate-aggregates; the spec keeps one pointer sentence.

Comment thread core-spec/expression_language.md Outdated

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.

perhaps should drop the list of specific databases here as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 621d442: now "Wide adoption across SQL database engines".

Comment thread core-spec/expression_language.md Outdated
Comment on lines +777 to +779
For a non-normative mapping of common functions across popular SQL dialects
(Snowflake, BigQuery, Databricks, PostgreSQL) and BI tools (Tableau, Looker
Studio, DAX, Sigma), see [extensions/function_mappings.md](../extensions/function_mappings.md).

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.

Let's not name specific vendors here or state popular. Maybe something like:

For a non-normative mapping of common functions across popular SQL dialects and other expression languages, see ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in the same change: no vendor names and no "popular" in the pointer.

Comment thread core-spec/expression_language.md Outdated
| Null coalesce | `COALESCE(a, b)` | `COALESCE(a, b)` or `NVL(a, b)` | `COALESCE(a, b)` or `IFNULL(a, b)` | `COALESCE(a, b)` | `COALESCE(a, b)` |
| Current timestamp | `CURRENT_TIMESTAMP` | `CURRENT_TIMESTAMP()` | `CURRENT_TIMESTAMP()` | `CURRENT_TIMESTAMP()` | `CURRENT_TIMESTAMP` |
| Substring | `SUBSTRING(s, start, len)` | `SUBSTR(s, start, len)` | `SUBSTR(s, start, len)` | `SUBSTRING(s, start, len)` | `SUBSTRING(s, start, len)` |
For a non-normative mapping of common functions across popular SQL dialects

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.

Beyond functions at this point, maybe something:

For a non-normative mapping from the portable Ossie dialect to vendor dialects and expressions, see ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 621d442, using your wording: "For a non-normative mapping from the portable Ossie dialect to vendor dialects and expressions, see ...".

Address review on apache#764:
- Overview: state that the document defines the portable Ossie dialect and
  point to Dialect-Specific Extensions for non-portable dialects
- Standards Reference: drop the list of specific databases
- Approximate aggregates: move the engine support table and BigQuery note
- Function-mapping pointer: neutral wording without vendor names
- NULL placement: move the native-defaults table and engine examples
- References: keep SQL:2003; move vendor and BI-tool references

Editorial and non-normative only, so no docs/spec_changes.md entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ashlearnnext-star

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @christianeu-db. I pushed 621d442. The Overview now says the document defines the portable Ossie dialect and links to Dialect-Specific Extensions for non-portable dialects. Each inline comment is answered in its thread. These are editorial, non-normative changes, so I have not added a docs/spec_changes.md entry. A few vendor names remain in the date-format and ROUND sections; I left them out of scope here and am happy to move them in a follow-up if you would like.

@ashlearnnext-star

Copy link
Copy Markdown
Contributor Author

#644 also targets #641 and was opened first. When I started this PR, #644 had change requests and merge conflicts pending. I can continue here, or bring over anything from #644 that this PR misses, whichever the maintainers prefer. @arnavshah038-jpg, thanks for starting this; please say if you'd like to pick it back up.

christianeu-db
christianeu-db previously approved these changes Nov 24, 2026

@christianeu-db christianeu-db 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.

Thanks @ashlearnnext-star, LGTM! It would be great if you could clean up the rest of the vendor references in this file as a followup

Comment thread core-spec/expression_language.md Outdated

This document defines the SQL expression language subset that Ossie-compliant implementations MUST support. The goal is to provide a portable expression language that works across all Ossie implementations while allowing vendors to expose richer database-specific functionality through dialect extensions. In particular, it is meant for expressions at the logical layer. This means metrics, fields, filters, etc In the future, expressions such as arbitrary join expressions should also use this expression language.

This document defines the portable Ossie dialect. Implementations may also carry non-portable vendor dialects; for how they fit into the specification and are mapped from the portable dialect, see [Dialect-Specific Extensions](#dialect-specific-extensions).

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.

nit: by the vendor dialect section I meant Dialect Extensions, which explains how dialects are declared and chosen and links the new mappings file. Could this link point to #dialect-extensions instead of the one-sentence subsection?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in 23c13d6: the Overview link now points to #dialect-extensions. Could you approve the workflow runs for this push when you get a chance? The validator tests pass locally (1104 passed).

@christianeu-db christianeu-db 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.

@ashlearnnext-star looks like you need to update validation/tests/test_validate.py to pass CI. While you are here, do you mind extracting the rest of the vendor references?

Ashwin Kumar and others added 2 commits November 24, 2026 20:53
…pings

Address review on apache#764:
- Overview: link to Dialect Extensions, which explains how dialects are
  declared and chosen
- Date formatting: keep the portable token table in the core spec and move
  the strftime and Java/LDML columns, and the Oracle examples, to a
  Datetime Format Tokens section in extensions/function_mappings.md
- Numeric semantics: replace the PostgreSQL ROUND example with a neutral
  one and move it to a Rounding section in function_mappings.md

The core spec now names no vendors outside the working-group table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ashlearnnext-star

Copy link
Copy Markdown
Contributor Author

Thanks, @christianeu-db. I merged main, which brings in the sqlglot fix from #818: the two failing tests pass locally (1104 passed), so no test change was needed. 23c13d6 points the Overview link to Dialect Extensions and moves the remaining vendor references: the strftime and Java/LDML columns and the Oracle examples from Date Formatting, and the PostgreSQL ROUND example. They are now in function_mappings.md under Datetime Format Tokens and Rounding. The core spec names no vendors outside the working-group table.

@christianeu-db
christianeu-db merged commit 7b8ed65 into apache:main Nov 25, 2026
15 checks passed
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.

Extract reamining dialect-specific mapping details / references from core-spec into extensions folder

2 participants