Repository navigation
docs: move dialect mappings to extensions - #644
arnavshah038-jpg wants to merge 3 commits into
Conversation
|
Thank you for your first contribution to Apache Ossie (incubating)! A committer will review your PR. In the meantime, please ensure:
No ICLA is required to contribute. If you are elected as a committer in the future, you will need an Individual Contributor License Agreement (ICLA) on file with the ASF. Questions? Ask in the PR comments or join us on Slack. We appreciate your contribution! |
|
|
||
| This document contains non-normative dialect-specific examples and BI-tool function mappings. These tables are references, not requirements for the portable core expression language. | ||
|
|
||
| ### Common Dialect Variations |
There was a problem hiding this comment.
After the # title, the file jumps directly to ###.
Can you please verify the headings here? It looks not well aligned.
| APPROX_PERCENTILE(response_time, 0.95) | ||
| ``` | ||
|
|
||
| **Database Support:** |
There was a problem hiding this comment.
Removing the support table means this section no longer says anything about portability.
The BigQuery difference (APPROX_QUANTILES returns an array) affects whether these functions are portable.
Could you add one line pointer here, such as "See Dialect and Tool Mappings for per database support"?
The "Database Function Support" section in the new file also needs a proper heading instead of the bold **Database Support:** label.
There was a problem hiding this comment.
This one is still open imho. The section doesn't point to the moved support table yet.
I suggest something like:
| **Database Support:** | |
| See [Database Function Support](../extensions/tool-mappings.md#database-function-support) for per-database support of these functions. | |
| ### Conditional Aggregations (REQUIRED) |
christianeu-db
left a comment
There was a problem hiding this comment.
Thanks again for the contribution! @arnavshah038-jpg , do you mind rebasing and taking another look at the review feedback when you get a chance? It would be great to keep this moving toward merge.
6e56988 to
07c3fe8
Compare
christianeu-db
left a comment
There was a problem hiding this comment.
Thanks @arnavshah038-jpg! One inline comment on the Sigma rows, which should be fixed before merging. @jbonofre, could you take another look at your change request once that's in?
| | `CASE WHEN...` | `CASE WHEN...` or `IF...` | `CASE WHEN...` | `SWITCH(TRUE(), ...)` | Only 3-argument `If(cond, t, f)`; no native multi-branch `CASE` | | ||
| | `IF(cond, t, f)` | `IF cond THEN t ELSE f END` | N/A (use CASE) | `IF(cond, t, f)` | `If(cond, t, f)` | | ||
| | `COALESCE(a, b)` | `IFNULL(a, b)` or `ZN(a)` | `COALESCE(...)` | `COALESCE(a, b)` | `IfNull(a, b)` (2-argument only) | | ||
| | `NULLIF(a, b)` | `IF a = b THEN NULL ELSE a END` | N/A | `IF(a = b, BLANK(), a)` | `If(a = b, Null(), a)` | |
There was a problem hiding this comment.
The Sigma cells for CASE WHEN... and NULLIF are the values from before #660, which corrected them on main. The move would bring back "no native multi-branch CASE" and If(a = b, Null(), a) in place of the variadic If(...) and NullIf(a, b). Could we carry over the current rows?
There was a problem hiding this comment.
I guess we have to get the current row onto main:
| | `CASE WHEN...` | `CASE WHEN...` or `IF...` | `CASE WHEN...` | `SWITCH(TRUE(), ...)` | Only 3-argument `If(cond, t, f)`; no native multi-branch `CASE` | | |
| | `IF(cond, t, f)` | `IF cond THEN t ELSE f END` | N/A (use CASE) | `IF(cond, t, f)` | `If(cond, t, f)` | | |
| | `COALESCE(a, b)` | `IFNULL(a, b)` or `ZN(a)` | `COALESCE(...)` | `COALESCE(a, b)` | `IfNull(a, b)` (2-argument only) | | |
| | `NULLIF(a, b)` | `IF a = b THEN NULL ELSE a END` | N/A | `IF(a = b, BLANK(), a)` | `If(a = b, Null(), a)` | | |
| | `CASE WHEN...` | ... | `If(c1, v1, c2, v2, ..., else)` (variadic; else is optional and defaults to Null) | | |
| | `IF(cond, t, f)` | ... (unchanged) | | |
| | `COALESCE(a, b)` | ... (unchanged) | | |
| | `NULLIF(a, b)` | ... | `NullIf(a, b)` | |
jbonofre
left a comment
There was a problem hiding this comment.
Thanks for the update. ASF header, the headings and the extensions/README.md entry look good now.
Imho, the Sigma CASE WHEN ... and NULLIF rows need the current values from main.
Also the Approximate Aggregations section still needs the pointer to the moved support table.
The PR should be rebase with resolved conflicts as well.
I'm happy to do that.
| | `CASE WHEN...` | `CASE WHEN...` or `IF...` | `CASE WHEN...` | `SWITCH(TRUE(), ...)` | Only 3-argument `If(cond, t, f)`; no native multi-branch `CASE` | | ||
| | `IF(cond, t, f)` | `IF cond THEN t ELSE f END` | N/A (use CASE) | `IF(cond, t, f)` | `If(cond, t, f)` | | ||
| | `COALESCE(a, b)` | `IFNULL(a, b)` or `ZN(a)` | `COALESCE(...)` | `COALESCE(a, b)` | `IfNull(a, b)` (2-argument only) | | ||
| | `NULLIF(a, b)` | `IF a = b THEN NULL ELSE a END` | N/A | `IF(a = b, BLANK(), a)` | `If(a = b, Null(), a)` | |
There was a problem hiding this comment.
I guess we have to get the current row onto main:
| | `CASE WHEN...` | `CASE WHEN...` or `IF...` | `CASE WHEN...` | `SWITCH(TRUE(), ...)` | Only 3-argument `If(cond, t, f)`; no native multi-branch `CASE` | | |
| | `IF(cond, t, f)` | `IF cond THEN t ELSE f END` | N/A (use CASE) | `IF(cond, t, f)` | `If(cond, t, f)` | | |
| | `COALESCE(a, b)` | `IFNULL(a, b)` or `ZN(a)` | `COALESCE(...)` | `COALESCE(a, b)` | `IfNull(a, b)` (2-argument only) | | |
| | `NULLIF(a, b)` | `IF a = b THEN NULL ELSE a END` | N/A | `IF(a = b, BLANK(), a)` | `If(a = b, Null(), a)` | | |
| | `CASE WHEN...` | ... | `If(c1, v1, c2, v2, ..., else)` (variadic; else is optional and defaults to Null) | | |
| | `IF(cond, t, f)` | ... (unchanged) | | |
| | `COALESCE(a, b)` | ... (unchanged) | | |
| | `NULLIF(a, b)` | ... | `NullIf(a, b)` | |
| APPROX_PERCENTILE(response_time, 0.95) | ||
| ``` | ||
|
|
||
| **Database Support:** |
There was a problem hiding this comment.
This one is still open imho. The section doesn't point to the moved support table yet.
I suggest something like:
| **Database Support:** | |
| See [Database Function Support](../extensions/tool-mappings.md#database-function-support) for per-database support of these functions. | |
| ### Conditional Aggregations (REQUIRED) |
Add ASF license header, fix heading hierarchy, add blank line before separator, list tool-mappings.md in extensions/README.md, and add a portability note to the core spec pointing to the extension docs.
14c7393 to
ec378a2
Compare
|
Thanks for the review! I've addressed all the feedback and rebased onto the latest main (also resolved the conflict in extensions/README.md):
Could you please take another look when you have time? |
|
@arnavshah038-jpg ended up merging #764 but flagged you in that PR description as a co-author |
Summary
Move database function support details from the core specification into extensions/tool-mappings.md.
Move dialect-specific variations and BI-tool function mappings into the extensions documentation.
Keep the core specification focused on portable expression language requirements.
Related Issues
Closes #641
Checklist
Specification
core-spec/and follow the existing structureOntology
ontology/are consistent with spec changesConverters
Validation
git diff --check passed locally.
Documentation
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