-
Notifications
You must be signed in to change notification settings - Fork 28.1k
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
[SPARK-34881][SQL][FOLLOWUP] Implement toString() and sql() methods for TRY_CAST #32098
Conversation
Kubernetes integration test starting |
Kubernetes integration test status failure |
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/TryCast.scala
Outdated
Show resolved
Hide resolved
Kubernetes integration test starting |
Kubernetes integration test status failure |
Test build #137083 has finished for PR 32098 at commit
|
|
||
test("try_cast: to_string") { | ||
assert(TryCast(Literal("1"), IntegerType).toString == "try_cast(1 as int)") | ||
} |
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.
Test sql
as well?
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.
It's already verified in the try_cast.sql.out
.
Test build #137090 has finished for PR 32098 at commit
|
Merging to master |
late lgtm. |
What changes were proposed in this pull request?
Implement toString() and sql() methods for TRY_CAST
Why are the changes needed?
The new expression should have a different name from
CAST
in SQL/String representation.Does this PR introduce any user-facing change?
Yes, in the result of
explain()
, users can see try_cast if the new expression is used.How was this patch tested?
Unit tests.