Skip to content

Commit ba4fedf

Browse files
author
James Cor
committed
fix some typing issues
1 parent c42d39f commit ba4fedf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

sql/planbuilder/scalar.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,11 @@ func (b *Builder) buildScalar(inScope *scope, e ast.Expr) (ex sql.Expression) {
109109
if v.StoredProcVal != nil {
110110
switch val := v.StoredProcVal.(type) {
111111
case *ast.SQLVal:
112-
return b.ConvertVal(val)
112+
resVal := b.ConvertVal(val)
113+
if lit, isLit := resVal.(*expression.Literal); isLit && val.Type == ast.FloatVal {
114+
return expression.NewLiteral(lit.Value(), types.Float64)
115+
}
116+
return resVal
113117
case *ast.NullVal:
114118
return expression.NewLiteral(nil, types.Null)
115119
}

0 commit comments

Comments
 (0)