-
Notifications
You must be signed in to change notification settings - Fork 270
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
Add jq and try_jq function. #17217
Add jq and try_jq function. #17217
Conversation
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Reviewer Guide 🔍
|
PR-Agent was enabled for this repository. To continue using it, please link your git user with your CodiumAI identity here. PR Code Suggestions ✨
|
User description
What type of PR is this?
Which issue(s) this PR fixes:
issue #17134
What this PR does / why we need it:
Added jq and try_jq function.
PR Type
Enhancement, Tests
Description
jq
andtry_jq
functions for JSON querying.Or
method inNulls
to modify in place.FunctionResult
.opBinaryStrStrToFixedWithErrorCheck
to use newFunctionResult
methods.FunctionSelectList
methods.JQ
andTRY_JQ
function IDs.jq
andtry_jq
to the list of supported functions.gojq
dependency and updatedgolang.org/x/sys
dependency.jq
andtry_jq
functions.Changes walkthrough 📝
7 files
nulls.go
Refactor `Or` method in `Nulls` to modify in place
pkg/container/nulls/nulls.go
Or
method to modifynsp
in place instead of returning a newNulls
object.functionTools.go
Add null handling methods to `FunctionResult`
pkg/container/vector/functionTools.go
FunctionResult
.baseTemplate.go
Update null handling in `opBinaryStrStrToFixedWithErrorCheck`
pkg/sql/plan/function/baseTemplate.go
opBinaryStrStrToFixedWithErrorCheck
to usenew
FunctionResult
methods.func_builtin_jq.go
Add `jq` and `try_jq` functions for JSON querying
pkg/sql/plan/function/func_builtin_jq.go
jq
andtry_jq
functions for JSON querying.function.go
Add null checks in `FunctionSelectList` methods
pkg/sql/plan/function/function.go
FunctionSelectList
methods.function_id.go
Add `JQ` and `TRY_JQ` function IDs
pkg/sql/plan/function/function_id.go
JQ
andTRY_JQ
function IDs.list_builtIn.go
Add `jq` and `try_jq` to supported functions
pkg/sql/plan/function/list_builtIn.go
jq
andtry_jq
to the list of supported functions.2 files
go.mod
Add `gojq` dependency and update `golang.org/x/sys`
go.mod
gojq
dependency.golang.org/x/sys
dependency.go.sum
Update checksums for dependencies
go.sum
2 files
func_jq.result
Add test cases for `jq` and `try_jq` functions
test/distributed/cases/function/func_jq.result
jq
andtry_jq
functions.func_jq.sql
Add SQL test script for `jq` and `try_jq` functions
test/distributed/cases/function/func_jq.sql
jq
andtry_jq
functions.