Repository navigation
docs(core-spec): extract dialect/tool function mappings to extensions/ - #764
Conversation
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.
christianeu-db
left a comment
There was a problem hiding this comment.
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
There was a problem hiding this comment.
can these vendor references be moved as well (SQL standard above is fine since it's the basis of Ossie SQL)
There was a problem hiding this comment.
Done in 621d442: SQL:2003 stays; the vendor and BI-tool references moved to a References section in extensions/function_mappings.md.
There was a problem hiding this comment.
These should also be extracted
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
This should be extracted
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
perhaps should drop the list of specific databases here as well
There was a problem hiding this comment.
Done in 621d442: now "Wide adoption across SQL database engines".
| 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). |
There was a problem hiding this comment.
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 ...
There was a problem hiding this comment.
Done in the same change: no vendor names and no "popular" in the pointer.
| | 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 |
There was a problem hiding this comment.
Beyond functions at this point, maybe something:
For a non-normative mapping from the portable Ossie dialect to vendor dialects and expressions, see ...
There was a problem hiding this comment.
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>
|
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 |
|
#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
left a comment
There was a problem hiding this comment.
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
|
|
||
| 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). |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
left a comment
There was a problem hiding this comment.
@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?
…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>
|
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 |
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
core-spec/and follow the existing structure[DISCUSS]thread ondev@with a stated end date, and reach lazy consensus (or pass a[VOTE]) before mergedocs/spec_changes.mdrecords rationale, compatibility and migration impact, or the PR explains why no entry is neededOntology
ontology/are consistent with spec changesConverters
Validation
validation/are updated if the spec changedDocumentation
docs/is updated to reflect any user-facing changesCONTRIBUTING.mdis updated if the contribution process changedExamples
examples/are added or updated for any new spec constructsTests
pytest/ CI green)Compliance
NOTICEand/orLICENSEhave been updated per ASF policy