Repository navigation
Conversation
The Translate stage's SQL block uses white-space: pre with horizontal scroll, so a clause-per-line layout shows as laid out. Diagnostics keep wrapping. A stage is a grid item, so it takes min-width: 0; without it, a long line widened the whole page.
Converted statements print each clause on its own line, select items and common table expressions one per line, queries indented by depth and long CASE expressions broken at WHEN, ELSE and END. Short ones stay on one line. Only whitespace between tokens changes. convert --compact keeps the single line, in --json too. Verify replays the laid-out SQL beside the single line and fails a case whose results differ, whose tokens differ, or whose layout is not idempotent.
The playground engine takes a compact setting like convert --compact, and the docs pages that print convert output show the laid-out form.
# Conflicts: # tests/unit/python/src/sqlquack/api/main/test_convert.py
Three cases for the snapshot time expression: TIMESTAMP_TZ values at several offsets, TIMESTAMP_LTZ values under a UTC session, and the CURRENT_TIMESTAMP() form as typing evidence.
…er utc-v1 Three Snowflake results for cases/temporal/to_timestamp_ntz_of_utc.toml: the UTC wall-clock time typed TIMESTAMP_NTZ(9) for TIMESTAMP_TZ and TIMESTAMP_LTZ inputs, and the type of the CURRENT_TIMESTAMP() form.
…C offset
TO_TIMESTAMP_NTZ(CONVERT_TIMEZONE('UTC', x)), the snapshot time
expression dbt-snowflake emits, keeps the UTC wall-clock time as
TIMESTAMP_NTZ(9), as recorded. It takes the same path as the cast to
TIMESTAMP_NTZ. TO_TIMESTAMP, the TRY_ form and a TIMESTAMP_TZ without
a known offset still refuse.
… cases to verify fensu reads a compared string literal as an unnamed decision; the function already reads TRY_ and _DATE by affix. The CLI cases repeat what the recorded cases prove and pushed test_convert.rs past 2,000 lines.
kvlonge
added a commit
that referenced
this pull request
Nov 6, 2026
Contributor
Author
|
Gate at a6176c1: check-ci 0, test-rust passed, verify FAILED with 2 of 11803 cases. to_timestamp_ntz_of_utc_tz and _ltz have nanosecond rows, and the converted SQL raises the existing timestamp_tz_submicro guard where Snowflake returns rows. Nothing wrong is produced, but the cases don't declare that divergence. This moves to after launch: declare the divergence (or drop the nanosecond rows), add the TZ(3) receipt, re-gate. |
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.
Why
dbt-snowflake's snapshot time,
to_timestamp_ntz(convert_timezone('UTC', current_timestamp())), refused with "TO_TIMESTAMP_NTZ of TIMESTAMP_TZ(9) with these arguments". That blocks every check-strategy snapshot and every snapshot withhard_deletes='invalidate'.Changes
TO_TIMESTAMP_NTZ of a TIMESTAMP_TZ known to hold the UTC offset (for example the result of
CONVERT_TIMEZONE('UTC', …)) now converts. It takes the same path as the receipt-backed cast to TIMESTAMP_NTZ and keeps the UTC wall-clock time as TIMESTAMP_NTZ(9).TO_TIMESTAMP, the TRY_ form and a TIMESTAMP_TZ without a known offset still refuse.
The rule's conditions say so.
New receipts,
cases/temporal/to_timestamp_ntz_of_utc.toml, recorded under utc-v1:Every result is TIMESTAMP_NTZ(9).
This branch includes the layout PR (#124); review the four commits above it.
Verification
verifyreplays the three new cases against their receipts. The existingto_timestamp_ntz_of_zonedreceipt (a TIMESTAMP_TZ without a known offset) stays refused.make check-ci,make test-rust,make verify-recorded(results in the gate comment).