-
Notifications
You must be signed in to change notification settings - Fork 732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(tsql): add support for DATETRUNC #4531 #4537
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work! Left a few comments from my first pass:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, one final nit from my end
Fixes #4531
This PR adds support for the
DATETRUNC
function ofT-SQL
.In cases, where the
date
parameter is astring literal
, a casting is applied to produce aDATETIME2
expression.Based on
T-SQL
, allstring literals
should resolve intoDATETIME2
.Dialects like
duckdb
do not support the directstring literals
as dates, thus the casting is mandatory.Docs
T-SQL DATETRUNC