Skip to content

fix: reject bracketed DuckDB keyword time functions - #30

Merged
kvlonge merged 1 commit into
mainfrom
fix/duckdb-keyword-parens
Sep 27, 2026
Merged

kvlonge merged 1 commit into
mainfrom
fix/duckdb-keyword-parens

Conversation

@kvlonge

@kvlonge kvlonge commented Sep 27, 2026

Copy link
Copy Markdown

Why

0.13.4 registered DuckDB's keyword time functions (current_time, current_timestamp, localtime, localtimestamp) as zero-argument catalog functions so their bare keyword forms validate. That also made CURRENT_TIMESTAMP() and the other bracketed forms valid, but DuckDB 1.5.2 rejects them ("Scalar Function with name current_timestamp does not exist!").

Changes

  • On DuckDB, a bracketed call to one of these keyword functions is reported as an unknown function (E202); the bare keyword form stays valid.
  • Regression test covering bare and bracketed forms of all four.
  • Version 0.13.7.

Verification

  • cargo test --lib -p polyglot-sql: 1341 passed; make test-rust-feature-gates passed; the new test fails without the fix.
  • Checked against DuckDB 1.5.2: bare forms execute, bracketed forms fail.

0.13.4 registered DuckDB's keyword time functions as zero-argument
catalog functions so the bare keyword forms validate, which also
accepted CURRENT_TIMESTAMP(), current_time(), localtime() and
localtimestamp(). DuckDB rejects those calls. Report the bracketed forms
as unknown functions and keep the keyword forms valid. Bump to 0.13.7.
@kvlonge
kvlonge merged commit b339548 into main Sep 27, 2026
24 checks passed
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