Skip to content

fix(compliance): follow up on the wide table stores fixture - #735

Merged
christianeu-db merged 1 commit into
apache:mainfrom
jbonofre:fix/wide-table-stores-followup
Nov 15, 2026
Merged

christianeu-db merged 1 commit into
apache:mainfrom
jbonofre:fix/wide-table-stores-followup

Conversation

@jbonofre

Copy link
Copy Markdown
Member

Follow-up to #728, addressing the non-blocking review comments.

Changes

  • New case a21_single_path_on_ambiguous_model. store_returns.total_returns by date_dim.year on stores_ambiguous returns rows. Section 8 row 17 raises E_AMBIGUOUS_PATH only for paths "between datasets that the lowering joins", and store_returns has a single path to date_dim. Without this case, an engine that rejects the whole model passes the ambiguous-path cases.
  • Renumbered the stores error cases to follow the order of the Section 8 table: e22 E_NO_PATH (row 13), e23 E_NO_ANCHOR (row 15), e24 and e25 E_AMBIGUOUS_PATH (row 17). The cross-references in a18–a20 and the README are updated.
  • date_dim.year → d_year in stores.sql, because YEAR is reserved in standard SQL (and in Calcite, Flink, H2). The model field is still year, through sql: d_year.
  • a17 explanation: an INNER JOIN drops only SS4, since SS5 still matches C3, so the NULL group would be 40, not missing. Fixed in a17 and the README fixtures section, and the spec list now cites Section 6 (S1) instead of 5.5.
  • Docs: the README intro and stores.sql now say that Appendix B.3 gives no rows, so the stores data is chosen for the cases. The retail fixture headers now apply only to the retail cases.
  • Makefile: compliance-validate uses compliance/wide_table/*/*.ossie.yaml, so new fixtures are validated automatically.

No expected rows change.

Testing

  • make compliance-validate: 12 of 12 files pass.
  • I loaded stores.sql into DuckDB and recomputed a16–a21 with the lowering of Sections 5.4–5.5. All of them match expected.json.

Address the review of apache#728:

- Add a21: store_returns.total_returns by date_dim.year on
  stores_ambiguous succeeds, because E_AMBIGUOUS_PATH applies only to
  paths between datasets that the lowering joins.
- Renumber the stores error cases so they follow the order of the
  Section 8 table: e22 E_NO_PATH, e23 E_NO_ANCHOR, e24 and e25
  E_AMBIGUOUS_PATH.
- Rename the physical date_dim column to d_year, since YEAR is a
  reserved word in standard SQL. The model field stays year.
- Correct the a17 and README explanation: an INNER JOIN drops only SS4
  and leaves a NULL group of 40.
- State that the stores rows are not from the specification, and scope
  the retail fixture headers to the retail cases.
- Validate every wide table model with a glob in compliance-validate.
@github-actions github-actions Bot added the infra label Nov 15, 2026

@iprithv iprithv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, a21 closes the gap I left in #728, and the a17 fix is correct. Thanks @jbonofre!

@christianeu-db christianeu-db left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm - thanks!

@christianeu-db
christianeu-db merged commit 3312f4d into apache:main Nov 15, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants