Skip to content

Commit d6e8780

Browse files
author
James Cor
committed
fix error for in
1 parent 0f6321c commit d6e8780

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sql/expression/in.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ func (in *InTuple) Eval(ctx *sql.Context, row sql.Row) (interface{}, error) {
9797
}
9898

9999
comp := newComparison(leftLit, NewLiteral(originalRight, el.Type()))
100-
cmp, err := comp.Compare(ctx, row)
100+
l, r, compareType, err := comp.castLeftAndRight(ctx, originalLeft, originalRight)
101+
if err != nil {
102+
return nil, err
103+
}
104+
cmp, err := compareType.Compare(ctx, l, r)
101105
if err != nil {
102106
return nil, err
103107
}

0 commit comments

Comments
 (0)