doris icon indicating copy to clipboard operation
doris copied to clipboard

[Bug] The function array_intersect query result is incorrect

Open LuGuangming opened this issue 3 years ago • 1 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Version

1.2.3/1.2.4/1.2.6

What's Wrong?

use doristest; create table array_except_table(k1 INT, k2 Array,k3 Array,k4 Array,k5 Array,k6 Array,k7 Array,k8 Array,k9 Array,k10 Array,k11 Array,k12 Array,k13 Array,k14 Array,k15 Array<varchar(128)>,k16 Array,k17 Array,k18 Array,k19 Array) duplicate key (k1) distributed by hash(k1) buckets 1 properties('replication_num' = '1');

insert into array_except_table values (1,[1,2,3], [2,4,5],[1,null,3],[1,3,5],[2200000000,-2200000000],[555,888],[1.1, 2.1, 3.44],[2.1, 3.4, 5.4],["2023-07-01","2023-07-07"],["2023-07-08","2023-07-09"],["2023-07-01 12:00:00","2023-07-07 16:00:00"],["2023-07-05 12:00:00","2023-07-08 16:00:00"],["1","2"],['hello', 'world', 'c++'],['I', 'am', 'c++'],[1.1, 2.1, 3.44],[2.1, 3.4, 5.4],[true,false]), (2,[2,3], [1,5],[null,null,2],[2,null,4],[2200000000,-2200000000],[555,888],[NULL, 2, 5],[NULL, NULL, 5.4],["2023-07-01","2023-07-07"],["2023-07-08","2023-07-09"],["2023-07-01 12:00:00","2023-07-07 16:00:00"],["2023-07-05 12:00:00","2023-07-08 16:00:00"],["1","2"],['a1', 'equals', 'b1'],['a2', 'equals', 'b2'],[NULL, 2, 5],[NULL, NULL, 5.4],[true,false]), (3,[1,1,1], [2,2,2],null,[1,2,3],[2200000000,-2200000000],[555,888],[1, NULL, 2, 5],[1, 3.1, 5.4],["2023-07-01","2023-07-07"],["2023-07-08","2023-07-09"],["2023-07-01 12:00:00","2023-07-07 16:00:00"],["2023-07-05 12:00:00","2023-07-08 16:00:00"],["1","2"],['hasnull', NULL, 'value'],['nohasnull', 'nonull', 'value'],[1, NULL, 2, 5],[1, 3.1, 5.4],[true,false]), (4,[1,1,2], [1,2,3],[1,2,2],[2,1,3],[2200000000,-2200000000],[555,888],[1.1,1.1,-2.3,-2.3],[-2.3],["2023-07-01","2023-07-07"],["2023-07-08","2023-07-09"],["2023-07-01 12:00:00","2023-07-07 16:00:00"],["2023-07-05 12:00:00","2023-07-08 16:00:00"],["1","2"],['hasnull', NULL, 'value'],['hasnull', NULL, 'value'],[128.58,3.14,128.58,3.14],[128.58,3.14],[true,false];

select k1,k15,k16,array_intersect(k15,k16) from array_except_table; image

What You Expected?

image

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

LuGuangming avatar Jul 25 '23 14:07 LuGuangming

We will fix the error in the documentation。

vinlee19 avatar Jul 28 '23 07:07 vinlee19