From 9ff03e8dd550182be156ee849bfb99d32bc8491e Mon Sep 17 00:00:00 2001 From: "Eugene R." Date: Fri, 29 Nov 2024 14:09:12 +0200 Subject: [PATCH] Parse nil keys properly in query operations (#457) [CLIENT-3196] Parse nil keys properly in query operations --------- Co-authored-by: Khosrow Afroozeh --- key_helper.go | 1 + value.go | 3 +++ 2 files changed, 4 insertions(+) diff --git a/key_helper.go b/key_helper.go index 38ead4ff..f237fc89 100644 --- a/key_helper.go +++ b/key_helper.go @@ -150,5 +150,6 @@ func (vb *keyWriter) writeKey(val Value) Error { return nil } + // TODO: Replace the error message with fmt.Sprintf("Key Generation Error. Value type not supported: %T", val) return newError(types.PARAMETER_ERROR, "Key Generation Error. Value not supported: "+val.String()) } diff --git a/value.go b/value.go index 1b60a8a4..297581a3 100644 --- a/value.go +++ b/value.go @@ -1275,6 +1275,9 @@ func bytesToKeyValue(pType int, buf []byte, offset int, length int) (Value, Erro } return ListValue(v), nil + case ParticleType.NULL: + return NewNullValue(), nil + default: return nil, newError(types.PARSE_ERROR, fmt.Sprintf("ParticleType %d not recognized. Please file a github issue.", pType)) }