Repository navigation
Conversation
Read as A's receipts (regexp-substr.column-arguments) record: NULL gives NULL; a position or occurrence below 1 or a negative group raises 100050 (22023), now a known Snowflake error of kind InvalidArgument; a start past the end gives NULL; ^ anchors at the start position; group 0 is the whole match and a group past the pattern's last gives NULL. A word boundary after a start position is refused, since no recording shows it. Parameters still need a text literal. regexp-substr t002, t003, t007, t008, t010 and column-arguments t001-t010 now match; t009 (parameters from a column) stays refused.
A start at or past the end leaves empty text, where DuckDB finds an
empty match ('' for x*) and Snowflake's result is unrecorded: the
receipts cover p = length + 1 and beyond only with a pattern that cannot
match empty text. Such a pattern now raises regexp_pattern_syntax on
this path, as REGEXP_COUNT and REGEXP_INSTR already do. The 15 recorded
cases still match; the other 12 REGEXP_SUBSTR case files are unchanged
(178 cases, 0 failed).
kvlonge
added a commit
that referenced
this pull request
Nov 6, 2026
'x*' on 'abc' at positions 3, 4 and 5, for #112's position handling.
Contributor
Author
|
Closing: SQLQuack lands through local-gate trains, not PR merges (D94), so open PRs only add clutter (D628/D630). The branch is kept. Any work here that isn't on main yet is tracked by the train owner and lands through a train. |
kvlonge
added a commit
that referenced
this pull request
Nov 9, 2026
D591's function conversion moves into sqlquack-convert's Snowflake analysis, beside analyze and analyze_function, with this branch's crate paths.
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.
Stacked on #98 (
fix/d215-lag-lead); review this diff against that branch.What changes
REGEXP_SUBSTR now converts when its position, occurrence or group is computed (a column or expression), not only a literal (
regexp_substr_computed). It follows A's receipts (regexp-substr.column-arguments, already on #98):INVALID_PARAMETER_VALUE/REGEXP_PARAMETER_FAILURESin sqlquack-core.^anchors at the start position.Evidence
The D94 gate runs on the landing head after #98 lands.
Review fix (f8a7eac)
On the computed path, a pattern that matches empty text now raises regexp_pattern_syntax, as REGEXP_COUNT and REGEXP_INSTR do. The receipts cover a start at or past the end only for patterns that can't match empty text. All 15 recorded cases still match, and the other 12 REGEXP_SUBSTR case files are unchanged (178 cases, 0 failed).
Follow-ups