From 87bb0298a4d1d10407160e939994bdfca5ca1791 Mon Sep 17 00:00:00 2001 From: pingyu Date: Sat, 5 Jan 2019 23:56:48 +0800 Subject: [PATCH] fix CI error, capture err returned by json.Walk --- expression/builtin_json.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/expression/builtin_json.go b/expression/builtin_json.go index c4a91ca6179fa..349993ebc1634 100644 --- a/expression/builtin_json.go +++ b/expression/builtin_json.go @@ -849,9 +849,15 @@ func (b *builtinJSONSearchSig) evalJSON(row chunk.Row) (res json.BinaryJSON, isN } pathExprs = append(pathExprs, pathExpr) } - obj.Walk(walkFn, pathExprs...) + err = obj.Walk(walkFn, pathExprs...) + if err != nil { + return res, true, errors.Trace(err) + } } else { - obj.Walk(walkFn) + err = obj.Walk(walkFn) + if err != nil { + return res, true, errors.Trace(err) + } } // return