-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-46515] Add MONTHNAME function #44483
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
Conversation
d950437 to
8c6015a
Compare
fd86b1d to
dfe3182
Compare
|
Parity with what? Snowflake: Note that if we start with English, then for non English locale's this would turn into a breaking change when we extend to it. So we need to tread crefully to not create a trap for ourselves. |
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
Outdated
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
Outdated
Show resolved
Hide resolved
|
+1, LGTM. Merging to master. |
| usage = "_FUNC_(date) - Returns the three-letter abbreviated month name from the given date.", | ||
| examples = """ | ||
| Examples: | ||
| > SELECT _FUNC_('2008-02-20'); |
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.
in the function doc, shall we avoid implicit cast and use DATE'2008-02-20'?
beliefer
left a comment
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.
Late LGTM.
What changes were proposed in this pull request?
Added MONTHNAME function which returns three-letter abbreviated month name for a given date to:
Why are the changes needed?
for parity with Snowflake
Does this PR introduce any user-facing change?
Yes, new MONTHNAME function
How was this patch tested?
With newly added unit tests
Was this patch authored or co-authored using generative AI tooling?
No