maropu commented on a change in pull request #26808: [SPARK-30184][SQL] 
Implement a helper method for aliasing functions
URL: https://github.com/apache/spark/pull/26808#discussion_r356906930
 
 

 ##########
 File path: 
sql/core/src/test/resources/sql-tests/results/udf/postgreSQL/udf-aggregates_part1.sql.out
 ##########
 @@ -101,7 +101,7 @@ struct<var_pop(CAST(CAST(udf(cast(b as string)) AS FLOAT) 
AS DOUBLE)):double>
 -- !query 12
 SELECT udf(var_samp(b)) FROM aggtest
 -- !query 12 schema
-struct<CAST(udf(cast(var_samp(cast(b as double)) as string)) AS DOUBLE):double>
+struct<CAST(udf(cast(var_samp(var_samp, cast(b as double)) as string)) AS 
DOUBLE):double>
 
 Review comment:
   It seems `bool_and/or` has the similar issue;
   ```
   scala> sql("select bool_and(a) from values (true), (true), (false) 
t(a)").explain(true)
   == Analyzed Logical Plan ==
   bool_and(a): boolean
   Aggregate [bool_and(bool_and, a#12) AS bool_and(a)#14]
              ^^^^^^^^^^^^^^^^^^^
   +- SubqueryAlias `t`
      +- LocalRelation [a#12]
   ```

----------------------------------------------------------------
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