Skip to content

feat(compliance): add Layer 3 B.3 stores fixture and E_AMBIGUOUS_PATH cases - #728

Merged
jbonofre merged 1 commit into
apache:mainfrom
iprithv:feat/wide-table-b3-ambiguous-path
Nov 15, 2026
Merged

jbonofre merged 1 commit into
apache:mainfrom
iprithv:feat/wide-table-b3-ambiguous-path

Conversation

@iprithv

@iprithv iprithv commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

Adds the stores fixture from Appendix B.3 and covers E_AMBIGUOUS_PATH.

stores_model has one path from store_sales to date_dim. stores_ambiguous_model adds store → date_dim through closing_date_id, so the same queries raise E_AMBIGUOUS_PATH (e22/e23). a19/a20 are those queries on the single-path model.

Also has unmatched home rows / NULL region (a17) so an INNER JOIN engine fails S1, plus the B.3 shared-dimension, no-path, and no-anchor cases.

Follow-up from #716.

… cases

Signed-off-by: prithvi <prithvisivasankar@gmail.com>
@github-actions github-actions Bot added the infra label Nov 14, 2026
@jbonofre
jbonofre self-requested a review November 15, 2026 17:20

@jbonofre jbonofre left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @iprithv , it looks good to me!

The stores fixture and the new cases match Appendix B.3. I recomputed the expected rows for a16-a20 from stores.sql and they all check out, and both models validate.

@jbonofre
jbonofre merged commit aa500d3 into apache:main Nov 15, 2026
5 checks passed
christianeu-db pushed a commit that referenced this pull request Nov 15, 2026
Address the review of #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.
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.

2 participants