Repository navigation
fix(compliance): count a changed returned sql against an ANSI-only input; an empty return drops its elements - #757
Merged
jbonofre merged 2 commits intoNov 18, 2026
Conversation
…put; an empty return drops its elements A returned OSSIE_SQL_2026 form is authoritative, so it is now a change when its text differs from the authored one even if the input had only an ANSI_SQL entry and that entry came back unchanged (review of apache#642). REJECTED now means no document came back. A valid document with no elements is a return, so its elements grade as dropped, diagnosed when the converter's warnings name them. Co-authored-by: Isaac <no-reply@databricks.com>
jbonofre
self-requested a review
November 18, 2026 21:33
jbonofre
previously approved these changes
Nov 18, 2026
jbonofre
left a comment
Member
There was a problem hiding this comment.
LGTM, thanks @MrBlack1995!
Both changes look clean and well-scoped, and all 54 grader tests pass locally (make compliance-test).
jbonofre
approved these changes
Nov 18, 2026
christianeu-db
added a commit
to christianeu-db/ossie-converters
that referenced
this pull request
Nov 21, 2026
… name The submodule's bare M0-M3 fixtures now carry their metrics at dataset scope, so they no longer name the same metrics as the model-scoped qualified fixtures. The tests derive the bare form from the qualified fixture instead, as the module already does for any metric whose shape it depends on. The grader rejects only a missing or empty return since apache/ossie#757, so the rejection test passes `{}`, which is what the matrix passes when an export fails. Co-authored-by: Isaac <no-reply@databricks.com>
christianeu-db
added a commit
to apache/ossie-converters
that referenced
this pull request
Nov 23, 2026
…ble_extensions (#247) * chore(deps): bump ossie from `ee89dbd` to `344259a` Co-authored-by: Isaac <no-reply@databricks.com> * test(databricks): expect the M6 ladder rung to fail, drop the M0 xfail apache/ossie#631 adds the M6 rung (YEAR, DATE_TRUNC, DATEDIFF). It shows two converter gaps: the round trip upper-cases the DATE_TRUNC unit, which the grader scores as REWRITTEN, and `translate` has no verified DATABRICKS form for DATEDIFF. Both rung tests are strict xfails until the converter handles them. The M0 qualified OSSIE_SQL case now passes against the sql-primary grader, as its comment anticipated, so its xfail goes. Co-authored-by: Isaac <no-reply@databricks.com> * test(interop): stop pairing the bare and qualified ladder fixtures by name The submodule's bare M0-M3 fixtures now carry their metrics at dataset scope, so they no longer name the same metrics as the model-scoped qualified fixtures. The tests derive the bare form from the qualified fixture instead, as the module already does for any metric whose shape it depends on. The grader rejects only a missing or empty return since apache/ossie#757, so the rejection test passes `{}`, which is what the matrix passes when an export fails. Co-authored-by: Isaac <no-reply@databricks.com> * fix(converters): write nonportable_extensions with object data apache/ossie#522 renames `custom_extensions` to `nonportable_extensions` with no alias, and types `data` as an object instead of a JSON string. The SDK renames `OssieCustomExtension` to `OssieNonportableExtension` and types `data` as `dict`. Every converter now writes and reads the new field with object data. Where a payload may hold values JSON cannot (dates from a YAML loader), it still goes through the converter's existing JSON encoding, now decoded back to an object. Committed fixtures and goldens move to the new shape. Vendor-side formats keep their own shapes: OBML `customExtensions` data stays a string, and Honeydew's `ossie` metadata keeps its item names. thoughtspot keeps reading both names and both shapes, and keeps a document that still uses the old name on it. orionbelt's v0.1 shim migrates a legacy `custom_extensions` list before it reads it. Tests that built a malformed JSON string cannot be constructed against the SDK any more and are removed, along with lightdash's EXTENSION_DATA_INVALID issue, which can no longer occur. Co-authored-by: Isaac <no-reply@databricks.com> * fix(databricks): translate DATEDIFF by day and keep the M6 rung portable The M6 ladder rung (YEAR, DATE_TRUNC, DATEDIFF) did not survive a round trip, for three reasons: - The default parser reads Ossie's part-first DATEDIFF(day, start, end) end-first, with the part as a column. The Ossie parser now reads the part first. Only the day count is translated: the Ossie specification does not say whether DATEDIFF counts part boundaries or whole parts elapsed (Databricks), and the two agree only for the days between two dates. - sqlglot upper-cases the DATE_TRUNC unit, so DATE_TRUNC('month', d) came back as 'MONTH'. Ossie output now writes the unit in lower case, as the specification does. - The Databricks parser wraps the argument of YEAR, MONTH, DAY and DAYOFYEAR in a TO_DATE that was not written. The wrapper is dropped on parse, so YEAR(x) comes back as YEAR(x). The M6 xfails go, as does the M0 xfail that expected the sql-primary grader. Co-authored-by: Isaac <no-reply@databricks.com> * test(dbt): move the ratio helper tests to nonportable_extensions Co-authored-by: Isaac <no-reply@databricks.com> * fix(atlan, wisdom): write nonportable_extensions with object data Co-authored-by: Isaac <no-reply@databricks.com> --------- Co-authored-by: Isaac <no-reply@databricks.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The grader follow-up promised on #642, now that #631 has landed. Two cases:
1. A changed
sqlhidden by an unchanged copy (the note on #642). With anANSI_SQL-only input, a converter that rewrites the returnedsqlbut passes theANSI_SQLcopy through graded PORTABLE, because the change check only looked at the authored tags:A returned
sqlis the authoritativeOSSIE_SQL_2026form, so it now counts as a change whenever its text differs from the authored one, whichever tags the input used.2. An empty but valid return (from the measurement discussion on apache/ossie-converters#65). REJECTED now means no document came back: nothing, not a mapping, or
{}, which is whatinterop/passes when an export failed. A document with content but no elements is a return, so each element grades DROPPED, diagnosed when the converter's warnings name it.Validation
{}stays REJECTED.interop/passes{}for a failed export, which a first version of this change graded as dropped (53 findings for two converters whose export fails);{}is REJECTED now, as on main.Related Issues
Follow-up to #642 (Chris's 11-11 note). Refs apache/ossie-converters#24. Independent of #700 and #756; the grader README line may need a trivial rebase against #756, whichever merges second.