diff --git a/go/libraries/doltcore/schema/schema_impl.go b/go/libraries/doltcore/schema/schema_impl.go index 5f8ddc7c8f..6bdc95170f 100644 --- a/go/libraries/doltcore/schema/schema_impl.go +++ b/go/libraries/doltcore/schema/schema_impl.go @@ -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)), diff --git a/go/libraries/doltcore/sqle/writer/prolly_index_writer_keyless.go b/go/libraries/doltcore/sqle/writer/prolly_index_writer_keyless.go index 3bacca45c3..32dea02870 100644 --- a/go/libraries/doltcore/sqle/writer/prolly_index_writer_keyless.go +++ b/go/libraries/doltcore/sqle/writer/prolly_index_writer_keyless.go @@ -184,6 +184,7 @@ type prollyKeylessSecondaryWriter struct { mut *prolly.MutableMap primary prollyKeylessWriter unique bool + spatial bool prefixLengths []uint16 keyBld *val.TupleBuilder diff --git a/go/libraries/doltcore/sqle/writer/prolly_table_writer.go b/go/libraries/doltcore/sqle/writer/prolly_table_writer.go index 5e265a5a14..a3a7e5d58b 100755 --- a/go/libraries/doltcore/sqle/writer/prolly_table_writer.go +++ b/go/libraries/doltcore/sqle/writer/prolly_table_writer.go @@ -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())),