Merge pull request #88 from jaffee/grpc-mutex-string-bug

mutex field data type should be string not []string
This commit is contained in:
Matthew Jaffee 2020-01-12 18:27:47 -06:00 committed by GitHub
commit 12c6cd1c4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -80,11 +80,16 @@ func (h grpcHandler) QueryPQL(req *pb.QueryPQLRequest, stream pb.Pilosa_QueryPQL
// uint64, bool, etc.) based on the Pilosa field type.
func fieldDataType(f *pilosa.Field) string {
switch f.Type() {
case "set", "mutex":
case "set":
if f.Keys() {
return "[]string"
}
return "[]uint64"
case "mutex":
if f.Keys() {
return "string"
}
return "uint64"
case "int":
if f.Keys() {
return "string"