Skip to content

Render CURRENT_DATE and CURRENT_TIME as bare keywords - #3523

Open
arpitjain099 wants to merge 1 commit into
kayak:masterfrom
arpitjain099:chore/current-date-time-no-parens
Open

Render CURRENT_DATE and CURRENT_TIME as bare keywords#3523
arpitjain099 wants to merge 1 commit into
kayak:masterfrom
arpitjain099:chore/current-date-time-no-parens

Conversation

@arpitjain099

Copy link
Copy Markdown

This fixes #809. CurDate() and CurTime() were rendering as CURRENT_DATE() and CURRENT_TIME(), but in PostgreSQL and standard SQL those are keywords, not function calls, so the trailing parentheses make the query invalid. CurTimestamp already handles this by overriding get_function_sql to drop the parens, so I did the same for the other two and updated the two existing tests that were asserting the old parenthesized output. I ran the full test suite locally and everything passes. Thanks for taking a look.

CurDate and CurTime emitted CURRENT_DATE() and CURRENT_TIME() with empty
parentheses, which is invalid in PostgreSQL and standard SQL where these are
keywords rather than function calls. CurTimestamp already overrides
get_function_sql to drop the parens; mirror that on CurDate and CurTime.
Updates the two existing tests that asserted the parenthesized form.

Fixes kayak#809

Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
@arpitjain099
arpitjain099 requested a review from a team as a code owner July 7, 2026 00:37
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.

CURRENT_DATE and CURRENT_TIME should appear without brackets

1 participant