-
Notifications
You must be signed in to change notification settings - Fork 590
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
feat(udf): support JSONB in UDF #9103
Merged
Merged
Conversation
This file contains 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
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
github-actions
bot
added
type/feature
user-facing-changes
Contains changes that are visible to users
labels
Apr 11, 2023
Codecov Report
@@ Coverage Diff @@
## main #9103 +/- ##
==========================================
+ Coverage 70.85% 70.88% +0.03%
==========================================
Files 1198 1198
Lines 199577 199628 +51
==========================================
+ Hits 141405 141512 +107
+ Misses 58172 58116 -56
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 5 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
BugenZhao
reviewed
Apr 12, 2023
xiangjinwu
reviewed
Apr 12, 2023
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
Signed-off-by: Runji Wang <wangrunji0408@163.com>
xiangjinwu
approved these changes
Apr 12, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
type/feature
user-facing-changes
Contains changes that are visible to users
📖✓
Covered or will be covered in the user docs.
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.
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
This PR adds support for using JSONB type as a parameter and return value in UDFs. resolves #8801
Example:
As Arrow doesn't support JSONB type, we have chosen to use
LargeUtf8
to represent JSONB on the Arrow side. A JSONB value is transmitted as a string in Arrow LargeStringArray. The Python SDK decodes the string into Python object and passes it into user functions. When returning a JSONB value, the SDK encodes the Python object into a string and then the CN parses it back to aJsonbVal
. It's worth noting that parsing the string may raise an error if it is an invalid json. So this PR changes the conversion from Arrow Array to Risingwave Array to be fallible.Checklist For Contributors
./risedev check
(or alias,./risedev c
)Checklist For Reviewers
Documentation
Click here for Documentation
Types of user-facing changes
Release note
Support JSONB type in UDFs.