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 type coercion between timestamp and unixtime #12891

Open
niebayes opened this issue Oct 12, 2024 · 1 comment
Open

Support type coercion between timestamp and unixtime #12891

niebayes opened this issue Oct 12, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@niebayes
Copy link
Contributor

Is your feature request related to a problem or challenge?

Say there's a table consisting of a timestamp column with the precision seconds. If we can support type coercion between timestamp and unixtime, a query SELECT * FROM tbl WHERE ts > 1723527660 would be regarded legal and there's no need to wrap the unixtime with the function from_unixtime.

Describe the solution you'd like

Add a cast path between timestamp and unixtime, and try to cast a integer to a certain timestamp type when building a plan. Reports an error when such a cast fails.

Describe alternatives you've considered

No response

Additional context

No response

@niebayes niebayes added the enhancement New feature or request label Oct 12, 2024
@Omega359
Copy link
Contributor

related: #11040
tangential (date & int64): #12342

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants