Repository navigation
test(duckshop): edge cases for conversion and analysis findings - #1292
Merged
Merged
Conversation
…s and VARIANTs Fixed rows for basket lines, date and time texts, amount checks, VARIANT attribute values and category links, with their staging models and tests. The ticket-note staging model passes its text on for the pattern cases.
… text and numbers Unordered ARRAY_AGG ranked under LIMIT and read by order-free functions, SELECT DISTINCT over arrays, TRY_TO_DATE formats, zoned text read back at UTC, TIME arithmetic and formats, JOIN USING across key widths, NULL arithmetic and literal types, MEDIAN scales, DIV0 by zero literals, JSON zero fractions and aggregates inside windows. Expectations await capture on Snowflake.
…xt patterns and lineage ARRAY_MAX, ARRAY_MIN and ARRAY_REVERSE over mixed arrays, VARIANT equality across types and typed leaves, recursive FLATTEN paths, regular expression and case-folding edges, CONNECT BY beside a level column, recursive CTEs without RECURSIVE, row-deciding clauses, join keys from the right side and SQL that name checks have flagged. Expectations await capture on Snowflake.
Volatile token and number functions checked by assertions that hold for any values, DIV0 of a volatile call beside look-alike names, a handler that answers NULL input, and Python values handed to VARIANT and FLOAT results.
Drop a window frame without ORDER BY, CONVERT_TIMEZONE with a lower-case 'utc' and a scalar subquery inside CONNECT BY, which Snowflake rejects; read SYSTEM$TYPEOF from finished CTEs; check tied modes and scale-15 medians with assertions; output typed VARIANT picks as kind and text; cast date-text clock columns in staging so the source contract has no precision. Expectations captured on Snowflake.
Fill the new edge tests' expected rows from two identical captures under the edge target, and list in the README the shapes Snowflake rejects and the answers worth knowing.
kvlonge
enabled auto-merge (squash)
November 2, 2026 01:08
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.
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
edge__*sources and staging models: basket lines, date and time texts, amount checks, VARIANT attribute values and category links.CONNECT BY, recursive CTEs, joins onUSING);edgesession.MEDIANabove scale 12) are checked by assertions.Verification
sqb compilereports 0 errors and 0 warnings, both with the edge area and on the core copy. The core-copy checksum is unchanged.edgetarget. Two capture runs in a row produced identical files.pytest benchmarks/duckshop/testspasses.ruffformat and lint are clean.make check-cipasses.