Skip to content

Commit 3b71615

Browse files
committed
bug fix for kvexec
1 parent 05adb06 commit 3b71615

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

go/libraries/doltcore/sqle/kvexec/lookup_join.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ func (l *lookupJoinKvIter) Close(_ *sql.Context) error {
6464
var _ sql.RowIter = (*lookupJoinKvIter)(nil)
6565

6666
func newLookupKvIter(
67-
srcIter prolly.MapIter,
68-
targetIter index.SecondaryLookupIterGen,
69-
mapping *lookupMapping,
70-
joiner *prollyToSqlJoiner,
71-
srcFilter, dstFilter, joinFilter sql.Expression,
72-
isLeftJoin bool,
73-
excludeNulls bool,
67+
srcIter prolly.MapIter,
68+
targetIter index.SecondaryLookupIterGen,
69+
mapping *lookupMapping,
70+
joiner *prollyToSqlJoiner,
71+
srcFilter, dstFilter, joinFilter sql.Expression,
72+
isLeftJoin bool,
73+
excludeNulls bool,
7474
) (*lookupJoinKvIter, error) {
7575
if lit, ok := joinFilter.(*expression.Literal); ok {
7676
if lit.Value() == true {
@@ -199,12 +199,12 @@ type lookupMapping struct {
199199
}
200200

201201
func newLookupKeyMapping(
202-
ctx *sql.Context,
203-
sourceSch schema.Schema,
204-
tgtKeyDesc *val.TupleDesc,
205-
keyExprs []sql.Expression,
206-
typs []sql.ColumnExpressionType,
207-
ns tree.NodeStore,
202+
ctx *sql.Context,
203+
sourceSch schema.Schema,
204+
tgtKeyDesc *val.TupleDesc,
205+
keyExprs []sql.Expression,
206+
typs []sql.ColumnExpressionType,
207+
ns tree.NodeStore,
208208
) (*lookupMapping, error) {
209209
keyless := schema.IsKeyless(sourceSch)
210210
// |split| is an index into the schema separating the key and value fields
@@ -254,7 +254,7 @@ func newLookupKeyMapping(
254254
for i, j := range litMappings {
255255
colTyp := typs[j]
256256
val, _, err := convertLiteralKeyValue(ctx, colTyp, keyExprs[j].(*expression.Literal))
257-
if err != nil {
257+
if err != nil && !sql.ErrTruncatedIncorrect.Is(err) {
258258
return nil, err
259259
}
260260

@@ -305,7 +305,7 @@ func convertLiteralKeyValue(ctx *sql.Context, colTyp sql.ColumnExpressionType, v
305305
}
306306
}
307307

308-
return destType.Convert(ctx, val)
308+
return destType.Convert(ctx, val.Value())
309309
}
310310

311311
// valid returns whether the source and destination key types

0 commit comments

Comments
 (0)