Skip to content
Snippets Groups Projects
Unverified Commit 96f74cc5 authored by ou yuanning's avatar ou yuanning Committed by GitHub
Browse files

fix bug (#4780)


Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: default avatarfengttt <fengttt@gmail.com>
parent 446ea372
No related branches found
No related tags found
No related merge requests found
......@@ -245,7 +245,7 @@ func coalesceString(vs []*vector.Vector, proc *process.Process, typ types.Type)
for j := 0; j < vecLen; j++ {
if rs.Nsp.Contains(uint64(j)) {
copy(dataVec[j], cols.Data)
dataVec[j] = append(dataVec[j], cols.Data...)
}
}
rs.Nsp.Np = nil
......
......@@ -17,9 +17,7 @@ select coalesce(a, 1) from t1;
-- echo error
select coalesce(b, 1) from t1;
-- @bvt:issue#4744
select coalesce(b, '1') from t1;
-- @bvt:issue
drop table t1;
......@@ -39,11 +37,9 @@ select * from t2;
select coalesce(a, 1.0) from t2;
select coalesce(a, 1) from t2;
-- @bvt:issue#4744
select coalesce(b, 2022-01-01) from t2;
select coalesce(b, 2022) from t2;
select coalesce(b, 2) from t2;
-- @bvt:issue
select coalesce(b, '2022-10-01') from t2;
......@@ -76,10 +72,8 @@ select coalesce(a, 0) from t3;
-- echo error
select coalesce(a, 200) from t3;
-- @bvt:issue#4744
select coalesce(b, '1') from t3;
select coalesce(b, 'bull') from t3;
-- @bvt:issue
drop table t3;
......
......@@ -24,8 +24,8 @@ Can't cast column from VARCHAR type to BIGINT type because of one or more values
select coalesce(b, '1') from t1;
coalesce(b, 1)
a
1
1
b
drop table t1;
drop table if exists t2;
......@@ -58,21 +58,21 @@ coalesce(a, 1)
select coalesce(b, 2022-01-01) from t2;
coalesce(b, 2022 - 1 - 1)
2022-02-20 10:10:11
2020
2023-04-03 22:10:30
2020
select coalesce(b, 2022) from t2;
coalesce(b, 2022)
2022-02-20 10:10:11
2022
2023-04-03 22:10:30
2022
select coalesce(b, 2) from t2;
coalesce(b, 2)
2022-02-20 10:10:11
2
2023-04-03 22:10:30
2
select coalesce(b, '2022-10-01') from t2;
coalesce(b, 2022-10-01)
2022-02-20 10:10:11
......@@ -128,15 +128,15 @@ coalesce(b, 1)
a
b
c
1
1
select coalesce(b, 'bull') from t3;
coalesce(b, bull)
a
b
c
bull
bull
drop table t3;
drop table if exists t4;
create table t4 (f1 date, f2 datetime, f3 varchar(20));
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment