Skip to content

test(duckshop): edge cases for missing text, number, array, clock and XML constructs - #1293

Merged
kvlonge merged 2 commits into
mainfrom
feat/duckshop-construct-gap
Nov 2, 2026
Merged

kvlonge merged 2 commits into
mainfrom
feat/duckshop-construct-gap

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Why

DuckShop's edge-case area is meant to exercise the Snowflake constructs real projects' tests rely on. Several common functions and syntax forms were still missing from it:

  • text and encoding functions;
  • bit and floor arithmetic;
  • null-safe comparisons;
  • comma joins after explicit joins;
  • array edits;
  • clock text conversions;
  • XML reads.

This adds them with expectations captured on Snowflake.

Changes

  • int_edge_sku_text_reads:
    • STARTSWITH, ENDSWITH, SUBSTRING, POSITION (with IN and with a comma), CHARINDEX, CHR, REGEXP_SUBSTR_ALL;
    • ::STRING and CAST ... AS STRING;
    • hex and Base64 functions;
    • a comment attached to a text literal.
  • int_edge_amount_bit_reads:
    • FLOOR, BITAND, ZEROIFNULL, ::BIGINT, ::DOUBLE;
    • IS NOT DISTINCT FROM and EQUAL_NULL;
    • a comma join after an explicit join;
    • HASH_AGG read in two row orders.
  • int_edge_basket_array_edits: ARRAY_APPEND, ARRAY_INTERSECTION, ARRAY_SLICE, TO_ARRAY and bracket array literals.
  • int_edge_clock_text_reads:
    • DATE, TO_TIME, TRY_TO_TIMESTAMP;
    • TO_TIMESTAMP_LTZ read back at UTC;
    • CURRENT_DATE and SYSDATE, used only for facts that hold on any day.
  • int_edge_basket_xml_reads: PARSE_XML, XMLGET and CHECK_XML.
  • One unit test per model, plus a README update.

Verification

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

…ock and XML functions

Cover text and encoding functions, flooring and bit masks, null-safe comparisons, a comma join after an explicit join, order-free HASH_AGG, array edits, clock text conversions with clock-free CURRENT_DATE and SYSDATE facts, and XML parsing, with expectations captured on Snowflake.
@kvlonge
kvlonge enabled auto-merge (squash) November 2, 2026 04:09
@kvlonge
kvlonge merged commit 60ca747 into main Nov 2, 2026
26 checks passed
@kvlonge
kvlonge deleted the feat/duckshop-construct-gap branch November 2, 2026 04:52
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