Skip to content
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

support DATE, TIME, and TIMESTAMP literal parsing #346

Merged
merged 3 commits into from
May 20, 2024
Merged

support DATE, TIME, and TIMESTAMP literal parsing #346

merged 3 commits into from
May 20, 2024

Conversation

jycor
Copy link

@jycor jycor commented May 16, 2024

The SQL standard has special syntax for parsing date, time, and timestring literals.
https://dev.mysql.com/doc/refman/8.0/en/date-and-time-literals.html

This PR adds support for that.
Code was mostly taken from vitessio.
The types are still left as string types, as type conversion later on handles it just fine.

@jycor jycor requested a review from zachmu as a code owner May 16, 2024 23:12
Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we just want to support this syntax and pass along the string to the engine that's fine, but I would expect this would convert to something like CAST(...)

@jycor jycor merged commit ff7bd63 into main May 20, 2024
4 checks passed
@jycor jycor deleted the james/date branch May 20, 2024 19:29
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.

2 participants