Repository navigation
test(duckshop): edge cases for missing text, number, array, clock and XML constructs - #1293
Merged
Merged
Conversation
…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.
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
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:
This adds them with expectations captured on Snowflake.
Changes
int_edge_sku_text_reads:STARTSWITH,ENDSWITH,SUBSTRING,POSITION(withINand with a comma),CHARINDEX,CHR,REGEXP_SUBSTR_ALL;::STRINGandCAST ... AS STRING;int_edge_amount_bit_reads:FLOOR,BITAND,ZEROIFNULL,::BIGINT,::DOUBLE;IS NOT DISTINCT FROMandEQUAL_NULL;HASH_AGGread in two row orders.int_edge_basket_array_edits:ARRAY_APPEND,ARRAY_INTERSECTION,ARRAY_SLICE,TO_ARRAYand bracket array literals.int_edge_clock_text_reads:DATE,TO_TIME,TRY_TO_TIMESTAMP;TO_TIMESTAMP_LTZread back at UTC;CURRENT_DATEandSYSDATE, used only for facts that hold on any day.int_edge_basket_xml_reads:PARSE_XML,XMLGETandCHECK_XML.Verification
sqb compilereports 0 errors and 0 warnings with the edge area. The core-copy checksum is unchanged.sqb format --checkis clean.edgetarget. Two capture runs in a row produced identical files.pytest benchmarks/duckshop/testspasses, andruffis clean.make check-cipasses.