Repository navigation
test(compliance): add portability rungs M4-M6 and the FILTER (WHERE) form of M3 #631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jbonofre
merged 16 commits into
apache:main
from
MrBlack1995:test/portability-m3filter-m4-m5-m6
Nov 18, 2026
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
bad008e
test(compliance): add portability rung M6, date and time scalars
MrBlack1995 1b121eb
test(compliance): add the FILTER (WHERE ...) form to portability rung M3
MrBlack1995 8a4e222
test(compliance): add portability rung M4, a cross-dataset metric
MrBlack1995 19beb20
test(compliance): add portability rung M5, metric-to-metric composition
MrBlack1995 2753e27
docs(compliance): describe portability rungs M0-M6
MrBlack1995 3d0bdf9
test(compliance): cover M4-M6 in the identity test, name every elemen…
MrBlack1995 9276156
test(compliance): carry M5's composition inlined, as the spec requires
MrBlack1995 4f1aa3d
test(compliance): write M3's CASE form without ELSE 0, as the FILTER …
MrBlack1995 8d3613a
test(compliance): carry the bare variants as dataset-scoped metrics, …
MrBlack1995 4f56afe
test(compliance): name manifest elements by the grader's keys; spec s…
MrBlack1995 eabac45
docs(compliance): point the portability ladder at apache/ossie-conver…
MrBlack1995 b8993a4
fix(compliance): keep the dataset qualifier on a field two datasets d…
MrBlack1995 e891100
test(compliance): move the M3-M6 fixtures to spec version 0.3.0.dev0
MrBlack1995 d2c4643
fix(compliance): resolve a dataset qualifier against the dataset that…
MrBlack1995 0995481
fix(compliance): treat a returned dataset with an authored dataset's …
MrBlack1995 639958b
docs(compliance): M5 carries composition inlined, without claiming me…
MrBlack1995 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A returned qualifier is now kept as written, so when a converter renames a dataset, every metric and field that names it is graded as dropped.
Lightdash names a dataset after its source table. For
M0.ansi.qualifiedit returns a datasetorders(source: samples.sales.orders) andorders_total_amount = SUM(orders.amount)for the authored datasetsalesandtotal_amount = SUM(sales.amount). Main pairs the two as "identity not preserved" (the review column). With this changeordersstaysorders, the trees differ, andtotal_amountis graded DROPPED_SILENT, plus an unrelated ADDEDorders_total_amount.The M1 field gets the same treatment (
amount * 1.1comes back asorders.amount * 1.1).I graded all 120 portability cases from the latest Interop matrix run on apache/ossie-converters main with main's grader and with this one. 19 lightdash elements in 8 cases (M0 x3, M1, M2 x2, M3 x2) move from review to DROPPED_SILENT, and nothing else changes. The converters table would then show lightdash silently dropping metrics it actually returned.
I suggest when a returned dataset has the same
sourceas an authored one, treat it as that dataset, and map its qualifiers on the returned side before resolving. I tried this locally. The 120 CI cases then grade exactly as onmain, and all 43 tests here still pass, includingtest_a_field_qualified_by_another_dataset_needs_review.Could we add a test built from lightdash's real M0 return, so this can't regress?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 0995481 as you suggested: a returned dataset that reads the source of exactly one authored dataset is treated as that dataset, and its qualifiers are mapped on the returned side before resolving. The 120 CI cases now grade as on main, and
test_a_dataset_renamed_after_its_source_is_the_authored_datasetis built from lightdash's real M0 return. Details in the comment below.