File tree Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Expand file tree Collapse file tree 2 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -616,6 +616,26 @@ FROM task_instance INNER JOIN job ON job.id = task_instance.queued_by_job_id INN
616616 Query : "SELECT '123.456' in (123.456);" ,
617617 Expected : []sql.Row {{true }},
618618 },
619+ {
620+ Query : "SELECT 123.456 in (123.456);" ,
621+ Expected : []sql.Row {{true }},
622+ },
623+ {
624+ Query : "SELECT 123.45 in (123.4);" ,
625+ Expected : []sql.Row {{false }},
626+ },
627+ {
628+ Query : "SELECT 123.45 in (123.5);" ,
629+ Expected : []sql.Row {{false }},
630+ },
631+ {
632+ Query : "SELECT '123.45a' in (123.5);" ,
633+ Expected : []sql.Row {{false }},
634+ },
635+ {
636+ Query : "SELECT '123.45a' in (123.4);" ,
637+ Expected : []sql.Row {{false }},
638+ },
619639 {
620640 SkipResultCheckOnServerEngine : true , // TODO: warnings do not make it to server engine
621641 Query : "SELECT '123.456ABC' in (123.456);" ,
Original file line number Diff line number Diff line change @@ -38,11 +38,8 @@ func GetCompareType(left, right sql.Type) sql.Type {
3838 return LongBlob
3939 }
4040 if IsNumber (left ) || IsNumber (right ) {
41- if IsDecimal (left ) {
42- return left
43- }
44- if IsDecimal (right ) {
45- return right
41+ if IsDecimal (left ) || IsDecimal (right ) {
42+ return InternalDecimalType
4643 }
4744 if IsFloat (left ) || IsFloat (right ) {
4845 return Float64
You can’t perform that action at this time.
0 commit comments