MCPcopy Index your code
hub / github.com/pingcap/tidb / evalJSON

Method evalJSON

pkg/expression/builtin_json.go:650–667  ·  view source on GitHub ↗
(ctx EvalContext, row chunk.Row)

Source from the content-addressed store, hash-verified

648}
649
650func (b *builtinJSONArraySig) evalJSON(ctx EvalContext, row chunk.Row) (res types.BinaryJSON, isNull bool, err error) {
651 jsons := make([]any, 0, len(b.args))
652 for _, arg := range b.args {
653 j, isNull, err := arg.EvalJSON(ctx, row)
654 if err != nil {
655 return res, true, err
656 }
657 if isNull {
658 j = types.CreateBinaryJSON(nil)
659 }
660 jsons = append(jsons, j)
661 }
662 bj, err := types.CreateBinaryJSONWithCheck(jsons)
663 if err != nil {
664 return res, true, err
665 }
666 return bj, false, nil
667}
668
669type jsonContainsPathFunctionClass struct {
670 baseFunctionClass

Callers

nothing calls this directly

Calls 3

CreateBinaryJSONFunction · 0.92
EvalJSONMethod · 0.65

Tested by

no test coverage detected