select: add MISSING operator support (#14406)

Probably not full support, but for regular checks it should work.

Fixes #14358
This commit is contained in:
Klaus Post
2022-02-25 12:31:19 -08:00
committed by GitHub
parent e43cc316ff
commit 88fd1cba71
8 changed files with 153 additions and 29 deletions

View File

@@ -52,12 +52,12 @@ func jsonpathEval(p []*JSONPathElement, v interface{}) (r interface{}, flat bool
}
}
// Key not found - return nil result
return nil, false, nil
return Missing{}, false, nil
case simdjson.Object:
elem := kvs.FindKey(key, nil)
if elem == nil {
// Key not found - return nil result
return nil, false, nil
return Missing{}, false, nil
}
val, err := IterToValue(elem.Iter)
if err != nil {