Skip to content

fix(f1002): Add missing p1, p2, p3 columns to most_podiums solution#138

Open
sfc-gh-zblackwood wants to merge 1 commit intodbt-labs:mainfrom
sfc-gh-zblackwood:zb/fix-f1002-most-podiums
Open

fix(f1002): Add missing p1, p2, p3 columns to most_podiums solution#138
sfc-gh-zblackwood wants to merge 1 commit intodbt-labs:mainfrom
sfc-gh-zblackwood:zb/fix-f1002-most-podiums

Conversation

@sfc-gh-zblackwood
Copy link
Copy Markdown
Contributor

@sfc-gh-zblackwood sfc-gh-zblackwood commented Mar 19, 2026

Summary

  • The __stats.yml spec defines most_podiums with 6 columns (rank, driver_full_name, podiums, p1, p2, p3) but the solution SQL and seed CSV only included 3 columns (rank, driver_full_name, podiums)
  • Updated tasks/f1002/solutions/most_podiums.sql to select p1, p2, p3 from finishes_by_driver
  • Updated tasks/f1002/seeds/solution__most_podiums.csv with the correct data including the breakdown columns

Impact

This isn't just a cosmetic fix — an agent that correctly reads the YML spec and includes p1, p2, p3 will fail the AUTO_most_podiums_equality test against the old seed. The old solution only passed because both the seed and the solution were missing the same columns. Correct agents are actively penalized by the current task.

Context

dbt_utils.test_equality compares all columns present in either table (not just the intersection). So when a correct model includes p1/p2/p3 but the seed doesn't, the equality check fails. The bug went unnoticed because the official solution was also missing those columns, making the seed and model match on their (incomplete) shared schema.

Test plan

  • Verified that the old seed + fixed solution (with p1/p2/p3) fails AUTO_most_podiums_equality (10/11 pass)
  • Verified that the new seed + fixed solution passes all tests (11/11 pass)
  • Both verified via ade run f1002 --db duckdb --project-type dbt --agent sage

The __stats.yml spec defines most_podiums with 6 columns (rank,
driver_full_name, podiums, p1, p2, p3) but the solution and seed CSV
only included 3 (rank, driver_full_name, podiums). This updates both
the solution SQL and the seed CSV to match the yml spec.

.... Generated with [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code)

Co-Authored-By: Cortex Code <[email protected]>
@sfc-gh-zblackwood sfc-gh-zblackwood force-pushed the zb/fix-f1002-most-podiums branch from 0dd38df to b47779e Compare March 19, 2026 19:02
@sfc-gh-zblackwood sfc-gh-zblackwood marked this pull request as ready for review March 19, 2026 19:20
@joellabes
Copy link
Copy Markdown
Collaborator

@sfc-gh-zblackwood good catch! The shared project (shared/projects/dbt/f1/models/stats/most_podiums.sql) only specifies those 3 columns, so I think the right move is actually to remove those columns from the yaml spec, rather than add columns to the expected output

@sfc-gh-zblackwood
Copy link
Copy Markdown
Contributor Author

Hi @joellabes, I'm happy to switch it that way. The only downside I see is that it makes the task easier, since it simplifies the spec that it has to follow.

sfc-gh-zblackwood added a commit to sfc-gh-zblackwood/ade-bench that referenced this pull request Mar 30, 2026
The shared project's most_podiums.sql only selects rank, driver_full_name,
and podiums — it does not include p1/p2/p3. Rather than adding columns to
the solution and seed, this aligns the yml spec to the existing model.

Alternate approach to dbt-labs#138 per @joellabes's suggestion.

.... Generated with [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code)

Co-Authored-By: Cortex Code <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants