wangyum commented on a change in pull request #24829: [SPARK-27988][SQL][TEST] 
Port AGGREGATES.sql [Part 3]
URL: https://github.com/apache/spark/pull/24829#discussion_r312691004
 
 

 ##########
 File path: 
sql/core/src/test/resources/sql-tests/results/pgSQL/aggregates_part3.sql.out
 ##########
 @@ -0,0 +1,108 @@
+-- Automatically generated by SQLQueryTestSuite
+-- Number of queries: 11
+
+
+-- !query 0
+create temporary view varchar_tbl as select * from values
+  ('a'),
+  ('A'),
+  ('1'),
+  ('2'),
+  ('3'),
+  (''),
+  ('c')
+  as varchar_tbl(f1)
+-- !query 0 schema
+struct<>
+-- !query 0 output
+
+
+
+-- !query 1
+select concat_ws(',', collect_list(a)) from (values('aaaa'),('bbbb'),('cccc')) 
g(a)
+-- !query 1 schema
+struct<concat_ws(,, collect_list(a)):string>
+-- !query 1 output
+aaaa,bbbb,cccc
+
+
+-- !query 2
+select concat_ws(',', collect_list(a)) from 
(values('aaaa'),(null),('bbbb'),('cccc')) g(a)
+-- !query 2 schema
+struct<concat_ws(,, collect_list(a)):string>
+-- !query 2 output
+aaaa,bbbb,cccc
+
+
+-- !query 3
+select concat_ws('AB', collect_list(a)) from 
(values(null),(null),('bbbb'),('cccc')) g(a)
+-- !query 3 schema
+struct<concat_ws(AB, collect_list(a)):string>
+-- !query 3 output
+bbbbABcccc
+
+
+-- !query 4
+select concat_ws(',', collect_list(a)) from (values(null),(null)) g(a)
+-- !query 4 schema
+struct<concat_ws(,, collect_list(a)):string>
+-- !query 4 output
+
+
+
+-- !query 5
+select concat_ws(',', sort_array(array_distinct(collect_list(f1)))) from 
varchar_tbl
+-- !query 5 schema
+struct<concat_ws(,, sort_array(array_distinct(collect_list(f1)), true)):string>
+-- !query 5 output
+,1,2,3,A,a,c
+
+
+-- !query 6
+select min(CASE WHEN unique1> 100 THEN unique1 END) from tenk1
+-- !query 6 schema
+struct<min(CASE WHEN (unique1 > 100) THEN unique1 END):int>
+-- !query 6 output
+101
+
+
+-- !query 7
+select sum(CASE WHEN ten > 0 THEN cast(1/ten as integer) END) from tenk1
+-- !query 7 schema
+struct<sum(CASE WHEN (ten > 0) THEN CAST((1 div ten) AS INT) END):bigint>
+-- !query 7 output
+1000
 
 Review comment:
   Revert it to original query.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to