Repository navigation
test(compliance): write wide table expected results as ost tables - #741
Merged
Merged
Conversation
Each case's expected.json becomes expected.txt: a comment line that names the fixture, and the result in the output format of the ost runner (a table, or "> error: <code>"). The title, question, behavior and spec sections of every case move to cases/README.md. query.json is unchanged. The README of the suite describes the new files. Results are compared by value, as before.
christianeu-db
approved these changes
Nov 16, 2026
christianeu-db
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thanks @ekut - this will make the migration to .ost much easier
This was referenced Nov 17, 2026
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.
Follow-up to #716: the first of the next steps in the review. The expected results of the wide table cases move from JSON to the table format of
ost(#667), and the notes on the cases move to one README,compliance/wide_table/cases/README.md.In each of the 46 folders of
compliance/wide_table/cases/:expected.jsonis removed.expected.txthas a comment line that names the fixture, and the expected result asostprints it: a table for the 21 cases that return rows, and the line> error: <code>for the 25 cases that raise an error.query.jsonis unchanged.cases/README.mdhas the title, question, behavior, and spec sections of each case, grouped by fixture. The wording is the same, except thatCOUNT(*)is in backticks: ine14, Markdown would read the two asterisks of one paragraph as emphasis.For example,
a05_groups_from_orders/expected.jsonwas:{ "title": "Groups come from the metric's dataset", "question": "What is the order amount by customer region?", "behavior": "One branch from orders. NORTH has no orders, so it is not a group.", "spec": ["5.4", "6.1"], "columns": ["region", "total_revenue"], "rows": [ ["EAST", 350], ["WEST", 300] ] }It is now
expected.txt, below the license header:and a section of
cases/README.md, underretail:compliance/wide_table/README.mddescribes the new files. Results are compared by value, as before: the rules ofcompliance/query/README.mdapply, and the table is the notation for the values.In the review of #716, @jbonofre noted that keeping
expected.jsonis fine since the binding is JSON. The query stays in JSON. The expected result changes its notation, as @christianeu-db asked in the same PR.Open questions:
ostcompares the text of a cell exactly, so350.00does not match350. The rules ofcompliance/query/README.mdcompare values, and types are not compared. I kept those rules. When the cases move to.ost, should they keep them, or should each case fix the type of its columns? A table also does not say whether a number is exact or approximate. The README takes that from the model, where onlyrevenue_per_customerreturns an approximate numeric.ostcompares an error by its message. The line> error: E_NO_PATHmatches only if the function that submits a Layer 3 query raises the error itself, with the code as its whole message:ostnever matches a database error. Is that the form you have in mind? The line also has no place for the optional fields that @jbonofre suggested in the review of feat(compliance): add Layer 3 wide table query cases #716, which a harness could check: the dimension or the filter, and the metric. If the cases should carry them, where should they go?Checks:
ostproduced the table text: for each of the 21 row cases I ranost --updateover aVALUESquery built from the rows of the oldexpected.json.expected.txtand each section ofcases/README.mdwith the oldexpected.jsonat da73e0e. The columns, rows, error codes, fixtures, spec sections, and texts are equal in the 46 cases.dev/check-licensepasses. Each new file has the ASF header.cc @christianeu-db @jbonofre