This commit is contained in:
James Cor
2023-01-31 12:45:11 -08:00
parent a8fed7cdb8
commit 76202a0df9
3 changed files with 8 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ import (
"github.com/dolthub/go-mysql-server/sql"
"github.com/dolthub/vitess/go/vt/proto/query"
"github.com/dolthub/dolt/go/gen/fb/serial"
"github.com/dolthub/dolt/go/store/types"
"github.com/dolthub/dolt/go/store/val"
)
@@ -429,6 +430,11 @@ func (si *schemaImpl) GetKeyDescriptor() val.TupleDesc {
Enc: val.Encoding(EncodingFromSqlType(query.Type_VARCHAR)),
Nullable: columnMissingNotNullConstraint(col),
}
} else if queryType == query.Type_GEOMETRY {
t = val.Type{
Enc: val.Encoding(serial.EncodingCell),
Nullable: columnMissingNotNullConstraint(col),
}
} else {
t = val.Type{
Enc: val.Encoding(EncodingFromSqlType(queryType)),

View File

@@ -184,6 +184,7 @@ type prollyKeylessSecondaryWriter struct {
mut *prolly.MutableMap
primary prollyKeylessWriter
unique bool
spatial bool
prefixLengths []uint16
keyBld *val.TupleBuilder

View File

@@ -120,6 +120,7 @@ func getSecondaryKeylessProllyWriters(ctx context.Context, t *doltdb.Table, sqlS
mut: m.Mutate(),
primary: primary,
unique: def.IsUnique(),
spatial: def.IsSpatial(),
prefixLengths: def.PrefixLengths(),
keyBld: val.NewTupleBuilder(keyDesc),
prefixBld: val.NewTupleBuilder(keyDesc.PrefixDesc(def.Count())),