-
Notifications
You must be signed in to change notification settings - Fork 1.5k
The return type of EXTRACT #1992
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
Comments
Do we need support negative timestamp or date? |
PG not support negative timestamp
|
I don't think we need to support negative timestamp. |
because i hit this document from PG https://www.postgresql.org/docs/14/functions-datetime.html and it points out that other point from the definition
|
now we can leave this issue and keep discussion it. |
@liukun4515 should we change the return to decimal/numeric type? |
just found that
|
from postgresql's doc The extract function is primarily intended for computational processing. For formatting date/time values for display, see Section 9.8. The date_part function is modeled on the traditional Ingres equivalent to the SQL-standard function extract:
|
This sounded surprising, it seems what is not supported is the input syntax starting with a minus sign. Negative timestamps are supported, just with a different syntax:
|
I think the result type of u32 is not enough.
From the spark,
But this is not related to this issue, I will open a follow up pull request and discuss the returned type.
Originally posted by @liukun4515 in #1991 (comment)
The text was updated successfully, but these errors were encountered: