Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
b41sh committed Jan 10, 2025
1 parent 6bd790c commit 475ef9e
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,11 @@ select string_agg(s, '|') from t3;
----
abc|def|xyz

query TT
select array_agg(s), array_agg(null) from t3;
----
['abc','def',NULL,'xyz'] [NULL,NULL,NULL,NULL]

statement ok
create table aggavg(shopid string, goodsid string, avgcostvalue decimal(16, 8), sdate_rn uint64, md string)

Expand Down Expand Up @@ -424,6 +429,11 @@ select json_object_agg(b, a), json_object_agg(b, c), json_object_agg(b, d), json
----
{"abc":20.0,"de":10.0,"xyz":5.99} {"de":100,"xyz":300} {"abc":{"k":"v"},"de":null,"xyz":[1,2,3]} {"abc":["a","b"],"de":[],"xyz":["z"]} {"abc":"a","de":"a","xyz":"a"}

query TTTTT
select array_agg(a), array_agg(b), array_agg(c), array_agg(d), array_agg(e), array_agg('a') from d
----
[20.00,10.00,4.23,5.99] ['abc','de',NULL,'xyz'] [NULL,100,200,300] ['{"k":"v"}','null','"uvw"','[1,2,3]'] [['a','b'],[],['x','y'],['z']] ['a','a','a','a']

statement ok
DROP TABLE d

Expand Down

0 comments on commit 475ef9e

Please sign in to comment.