Skip to content

Commit

Permalink
fix CI error, capture err returned by json.Walk
Browse files Browse the repository at this point in the history
  • Loading branch information
pingyu committed Jan 5, 2019
1 parent f05d889 commit 87bb029
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions expression/builtin_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 87bb029

Please sign in to comment.