-
Notifications
You must be signed in to change notification settings - Fork 29.1k
[SPARK-49939][SQL] Codegen Support for json_object_keys (by Invoke & RuntimeReplaceable) #48428
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
…RuntimeReplaceable)
| jsonParser.skipChildren(); | ||
| } | ||
| return new GenericArrayData(arrayBufferOfKeys.toArray()); | ||
| } catch (IOException e) { |
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.
Why don't you handle JsonProcessingException?
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.
|
+1, LGTM. Merging to master. |
|
@panbingkun Do you plan to add codeGen support for |
Yes! |
|
cool. If you are not planning for |
I don't think |
|
sorry for naive question, any reason why |
If we use
|
…emove redundant whether is null check ### What changes were proposed in this pull request? - The pr aims to remove redundant `whether is null check` when implementing codegen using `Invoke` and `StaticInvoke` (they have a `propagateNull` tag, with a default value of `true`) - The pr is following up: #48224 #48428 #48467 #48509 ### Why are the changes needed? Delete unnecessary logic, improve performance, and reduce misunderstandings. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? - Pass GA. - Manually check ``` ./build/sbt "sql/testOnly org.apache.spark.sql.JsonFunctionsSuite" ./build/sbt "catalyst/testOnly org.apache.spark.sql.catalyst.expressions.JsonExpressionsSuite" ``` - json_array_length JsonFunctionsSuite#`json_array_length function` - json_object_keys JsonFunctionsSuite#`json_object_keys function` - to_json JsonFunctionsSuite#`roundtrip in to_json and from_json - struct` JsonFunctionsSuite#`roundtrip in to_json and from_json - array` - from_json JsonFunctionsSuite#`roundtrip in to_json and from_json - struct` ### Was this patch authored or co-authored using generative AI tooling? No. Closes #48699 from panbingkun/SPARK-49766_FOLLOWUP. Authored-by: panbingkun <panbingkun@baidu.com> Signed-off-by: Max Gekk <max.gekk@gmail.com>


What changes were proposed in this pull request?
The pr aims to add
CodegenSupport forjson_object_keys.Why are the changes needed?
Does this PR introduce any user-facing change?
No.
How was this patch tested?
Pass GA & Existed UT (eg: JsonFunctionsSuite#
json_object_keys function)Was this patch authored or co-authored using generative AI tooling?
No.