-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-52634][SQL][DOCS] Update the ANSI compliance page regarding the TIME type #51333
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
base: master
Are you sure you want to change the base?
Conversation
| Numeric | <span style="color:red">**Y**</span> | <span style="color:red">**Y**</span> | N | N |<span style="color:red">**Y**</span> | N | <span style="color:red">**Y**</span> | Y | N | N | N | N | | ||
| String | <span style="color:red">**Y**</span> | Y | <span style="color:red">**Y**</span> | Y |<span style="color:red">**Y**</span> | <span style="color:red">**Y**</span> | <span style="color:red">**Y**</span> | <span style="color:red">**Y**</span> | Y | N | N | N | | ||
| Date | N | Y | Y | N | Y | Y | N | N | N | N | N | N | | ||
| Time | N | Y | N | N | N | N | N | N | N | N | N | N | |
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.
Casting from Time to Time should be allowed, right?
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.
I do believe the table should reflect actual information, but not potential support. At the moment, the casting from TIME(n) to TIME(m) (m could be different from n) has not been supported yet. There is the task for that: https://issues.apache.org/jira/browse/SPARK-52618
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.
But casting from TIME(n) to TIME(n) is supported...
Shall we keep the doc open until https://issues.apache.org/jira/browse/SPARK-52618 is done?
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.
But casting from TIME(n) to TIME(n) is supported...
Yep.
Shall we keep the doc open until https://issues.apache.org/jira/browse/SPARK-52618 is done?
ok, let's keep it open till the task is done.
| Numeric | Y | Y | N | N | N | N | N | N | N | N | N | N | | ||
| String | N | Y | N | Y | N | N | N | N | N | N | N | N | | ||
| Date | N | Y | Y | N | Y | Y | N | N | N | N | N | N | | ||
| Time | N | Y | N | N | N | N | N | N | N | N | N | N | |
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.
Storing from Time to Time should be allowed, right?
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.
You are right for the same precision. How about we will update the table when casting from TIME(n) to TIME(m) is fully supported.
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.
Storing from TIME(n) to TIME(n) is allowed, right? Shall we mark it as yes and then explain when it is allowed
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.
Storing from TIME(n) to TIME(n) is allowed, right?
Right.
Shall we mark it as yes and then explain when it is allowed
ok, let me do that.
What changes were proposed in this pull request?
In the PR, I propose to update the doc page https://spark.apache.org/docs/latest/sql-ref-ansi-compliance.html#cast regarding the TIME data type. After the update, the page looks like:

Why are the changes needed?
To provide actual information about the TIME data type to Spark SQL users.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Manually by building and checking the page:
Was this patch authored or co-authored using generative AI tooling?
No.