Skip to content

Commit

Permalink
Parse nil keys properly in query operations (#457)
Browse files Browse the repository at this point in the history
[CLIENT-3196] Parse nil keys properly in query operations

---------

Co-authored-by: Khosrow Afroozeh <[email protected]>
  • Loading branch information
reugn and khaf authored Nov 29, 2024
1 parent d66939d commit 9ff03e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions key_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
3 changes: 3 additions & 0 deletions value.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit 9ff03e8

Please sign in to comment.