Skip to content

test(duckshop): edge cases for conversion and analysis findings - #1292

Merged
kvlonge merged 8 commits into
mainfrom
feat/duckshop-review-edges
Nov 2, 2026
Merged

kvlonge merged 8 commits into
mainfrom
feat/duckshop-review-edges

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Why

Reviews of SQL conversion and analysis turned up shapes where a Snowflake-to-DuckDB conversion gave a different answer, or where valid Snowflake SQL was reported as an error. DuckShop's edge-case area is where such shapes live as executable examples, with expected values captured on Snowflake, so this adds them there.

Changes

  • New fixed-row edge__* sources and staging models: basket lines, date and time texts, amount checks, VARIANT attribute values and category links.
  • Edge models and unit tests for:
    • ordering through arrays;
    • dates and zoned times read from text, and time arithmetic;
    • numbers, NULL arithmetic and literal types;
    • VARIANT comparisons;
    • text patterns;
    • lineage-sensitive clauses (CONNECT BY, recursive CTEs, joins on USING);
    • compile-only analysis patterns.
  • Five edge Python functions, covering volatile values, NULL input and values returned as VARIANT.
  • Expectations captured on Snowflake under the pinned edge session.
    • Values Snowflake does not define (ties, volatile calls, MEDIAN above scale 12) are checked by assertions.
    • Shapes Snowflake rejects are left out and listed in the README.
  • README and RUNBOOK updates: the new groups and counts, known limitations, and capture guidance.

Verification

  • sqb compile reports 0 errors and 0 warnings, both with the edge area and on the core copy. The core-copy checksum is unchanged.
  • The edge build and tests pass on Snowflake under the edge target. Two capture runs in a row produced identical files.
  • pytest benchmarks/duckshop/tests passes.
  • ruff format and lint are clean.
  • make check-ci passes.
  • The public-repository hygiene scan passes.

Loading
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.

1 participant