-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-49121][SQL] Support from_protobuf and to_protobuf for SQL functions
#47716
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
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/FunctionRegistry.scala
Outdated
Show resolved
Hide resolved
0ddcad7 to
c420fe5
Compare
from_protobuf and to_protobuf for SQL functionsfrom_protobuf and to_protobuf for SQL functions
|
cc @HyukjinKwon @hvanhovell I think now it is ready for review. Please take a look when you find some time :-) Also cc @cloud-fan FYI |
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.
nit:
"The .. argument of .. SQL function must be a (constant string).."
Those 6 error messages might be able to reuse a template string and/or a centralized mapping for clarity. Just a thought for minor improvement no need to be in this pr
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.
Thanks! Let me address it from follow-up PR since we have more similar cases from from_avro and to_avro, and I plan to remove those duplications from follow-ups
|
Let's also fix the test failure: |
c78fddf to
9822da3
Compare
|
|
|
Merged to master. |
| } | ||
| } | ||
|
|
||
| test("SPARK-49121: from_protobuf and to_protobuf SQL functions") { |
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.
@itholic It seems that this test cannot be successfully tested in the Maven daily test, both Java 17 and Java 21:
- Java 21: https://github.com/apache/spark/actions/runs/10509632076/job/29116303271
- Java 17: https://github.com/apache/spark/actions/runs/10508648823/job/29113000899
also cc @HyukjinKwon
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.
@itholic mind taking a look please?
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.
@itholic @HyukjinKwon Attempting to fix: #47855
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.
Thanks for following up.
What changes were proposed in this pull request?
This PR proposes to support
from_protobufandto_protobuffor SQL functionsSimilar to #46977
Why are the changes needed?
For improving feature parity with DataFrame API
Does this PR introduce any user-facing change?
This enables
from_protobufandto_protobuffrom SQL functionsHow was this patch tested?
Added UTs.
Was this patch authored or co-authored using generative AI tooling?
No.