feat: json_merge expression and sql function#17081
Merged
abhishekagarwal87 merged 1 commit intoapache:masterfrom Sep 17, 2024
Merged
feat: json_merge expression and sql function#17081abhishekagarwal87 merged 1 commit intoapache:masterfrom
abhishekagarwal87 merged 1 commit intoapache:masterfrom
Conversation
10 tasks
Contributor
|
@lkm - There are compilation failures. You may have to rebase your PR too. |
Contributor
Author
It seems things have shifted in master since I did this originally. Will resolve those problems soon |
Contributor
Author
|
@abhishekagarwal87 I think we're good to go now. |
abhishekagarwal87
approved these changes
Sep 17, 2024
Contributor
|
Thank you for your contribution @lkm |
Contributor
Author
Thanks for merging! |
pranavbhole
pushed a commit
to pranavbhole/druid
that referenced
this pull request
Sep 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This add a new
json_mergeexpression which takes two or more arguments to merge into a single json structure. It also added the corresponding SQL function. This is useful for transforming data in druid, for instance I use it for flattening arrays of objects using fold, e.g.fold((a, acc) -> json_merge(acc, json_object(json_value(a, '$.key'), json_value(a, '$.value'))), arrayofkv, json_object())Fixed the bug ...
Renamed the class ...
Added a forbidden-apis entry ...
Release note
Key changed/added classes in this PR
json_mergeexpression functionjson_mergesql functionThis PR has: