Repository navigation
Conversation
…de the recorded range
CUME_DIST(), PERCENT_RANK() and NTH_VALUE(x, 1) without OVER: A's screen showed Snowflake refusing each when compiling (2064, 42601, missing window specification). compile_error and tags are not hashed, so the case hashes stay as screened.
The translation category needs a case covering type-combination inputs; dropping the tag made sqlquack pending refuse the file.
Snowflake results for the three cases in cases/translation/functions/window-without-over.toml at 2d94c3e: each is refused with 2064 (SQLSTATE 42601).
Snowflake rejects these window functions without an OVER clause when compiling (2064, SQLSTATE 42601, missing window specification; receipts on evidence/d215-receipts 19c3fd9). Nothing caught them: check passed the SQL, and convert only refused it for lacking a rule (SQ0002). The refusal layer now rejects a call to one of the three that no OVER clause applies to as SQ0205 window_without_over, in check and convert, nested or not. The lineage scope rule reports E232 for them as well, for the typed nodes DuckDB parses and the named calls Snowflake's faithful parse keeps.
…-window-without-over
Snowflake results for the three cases in cases/translation/functions/get-path.cast-then-path.toml at 7b15243.
Review asked whether a modifier between the call and OVER hides the call from the windowed set. It does not: these spellings report nothing in the refusal layer or the E232 rule, and now stay pinned that way.
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. |
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
Snowflake rejects
CUME_DIST(),PERCENT_RANK()andNTH_VALUE(x, n)without an OVER clause when compiling: error 2064, SQLSTATE 42601, "Missing window specification for function [...]". The receipts are onevidence/d215-receipts19c3fd9, casestranslation/functions/window-without-over.toml. Before this change nothing caught them:sqlquack checkreported no problems, andconvertonly refused with SQ0002 (no verified rule).window_without_over(sqlquack-core refusals): a call to one of the three that no OVER clause applies to is now rejected, nested or not, in bothcheckandconvert. The calls an OVER clause wraps are collected once per statement, so every other call is judged against that list.NthValue, andCumeDist/PercentRankwithout hypothetical arguments) and the named calls Snowflake's faithful parse keeps.get-path.cast-then-path.tomlon this chain needs.Evidence
checkandconvertbefore: no problems / SQ0002. After:error[SQ0205]for each of the three. With OVER, nothing is reported.window-without-over.tomlandget-path.cast-then-path.toml: 6 refused, 0 pending, 0 failed. The cast-then-path cases refuse on a known parser gap, which is queued separately.make check-mergeconfigures. The D94 gate runs on the landing head.Scope
Only the three receipt-backed functions are covered. ROW_NUMBER, RANK, LAG and the others without OVER also pass
checktoday under Snowflake's faithful parse; that needs receipts before it's widened.Follow-ups
NTH_VALUE(x, n) FROM FIRST|LAST [IGNORE|RESPECT NULLS]written without OVER still passescheck. That's a false negative only (convert refuses with SQ0002), and no receipt shows it yet. The same spellings under OVER are pinned as reporting nothing (96ff683).