mirror of
https://github.com/dolthub/dolt.git
synced 2026-03-15 11:20:37 -05:00
fix panic
This commit is contained in:
@@ -217,6 +217,9 @@ func PutField(ctx context.Context, ns tree.NodeStore, tb *val.TupleBuilder, i in
|
||||
case val.CommitAddrEnc:
|
||||
tb.PutCommitAddr(i, v.(hash.Hash))
|
||||
case val.CellEnc:
|
||||
if _, ok := v.([]byte); ok {
|
||||
v = deserializeGeometry(v.([]byte))
|
||||
}
|
||||
tb.PutCell(i, ZCell(v.(types.GeometryValue)))
|
||||
default:
|
||||
panic(fmt.Sprintf("unknown encoding %v %v", enc, v))
|
||||
|
||||
@@ -18,6 +18,7 @@ import (
|
||||
"bytes"
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/dolthub/dolt/go/libraries/doltcore/sqle/index"
|
||||
"io"
|
||||
"strings"
|
||||
|
||||
@@ -211,7 +212,7 @@ func BuildSecondaryProllyIndex(ctx context.Context, vrw types.ValueReadWriter, n
|
||||
keyBld.PutRaw(to, k.GetField(from))
|
||||
} else {
|
||||
from -= pkLen
|
||||
keyBld.PutRaw(to, v.GetField(from))
|
||||
index.PutField(ctx, ns, keyBld, to, v.GetField(from))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user