You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/07/10 04:28:29 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #25089: [SPARK-28275][SQL][PYTHON][TESTS] Convert and port 'count.sql' into UDF test base

HyukjinKwon commented on a change in pull request #25089: [SPARK-28275][SQL][PYTHON][TESTS] Convert and port 'count.sql' into UDF test base
URL: https://github.com/apache/spark/pull/25089#discussion_r301881829
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/inputs/udf/udf-count.sql
 ##########
 @@ -0,0 +1,28 @@
+-- This test file was converted from count.sql
+-- Test data.
+CREATE OR REPLACE TEMPORARY VIEW testData AS SELECT * FROM VALUES
+(1, 1), (1, 2), (2, 1), (1, 1), (null, 2), (1, null), (null, null)
+AS testData(a, b);
+
+-- count with single expression
+SELECT
+  udf(count(*)), udf(count(1)), udf(count(null)), udf(count(a)), udf(count(b)), udf(count(a + b)), udf(count((a, b)))
 
 Review comment:
   @vinodkc, can make some other conbinations like `udf(count(*))`, `count(udf(a))`, `udf(count(udf(a)))``?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org