Skip to content

refactor(syntax): drop the lowered call mode - #177

Merged
kvlonge merged 1 commit into
mainfrom
chore/remove-lowered-mode
Nov 11, 2026
Merged

kvlonge merged 1 commit into
mainfrom
chore/remove-lowered-mode

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

Why

CallMode::Lowered reproduced Polyglot's call lowering for the equivalence check. That check is gone, and nothing else uses the mode. It is the last parser code whose only job was to match Polyglot.

Changes

  • Remove CallMode::Lowered and the parser config flag that switched it. The parser now always keeps Snowflake calls as written, including in nested procedure bodies.
  • Standalone type parsing, which used the flag's default, takes the same path.
  • Remove the ported test that read TRY_TO_NUMBER's lowered precision and scale.
  • The tests that compared the two modes now assert the node each call keeps: keyword syntax stays typed, kept calls stay calls, and DuckDB keeps its typed nodes.

Verification

  • make check-ci RECORDER=0 EVIDENCE_BASE=origin/main passes on this head.
  • Every corpus verdict is unchanged.

CallMode::Lowered reproduced Polyglot's call lowering for the removed
equivalence check. Nothing outside the parser's own tests and nested
procedure bodies of a lowered parse used it, so the parser now always
keeps Snowflake calls as written, and the config flag that switched it
goes too. Standalone type parsing, which used the flag's default,
follows the same path; every corpus verdict is unchanged.

The ported test that read TRY_TO_NUMBER's lowered precision and scale
goes with the mode. The tests that compared the two modes now assert
the node each call keeps: keyword syntax stays typed, kept calls stay
calls, and DuckDB keeps its typed nodes.
@kvlonge
kvlonge added this pull request to the merge queue Nov 11, 2026
Merged via the queue into main with commit 708c4b4 Nov 11, 2026
8 checks passed
@kvlonge
kvlonge deleted the chore/remove-lowered-mode branch November 11, 2026 14:54
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