cloud-fan 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_r356561965
########## 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: This looks weird. Looking at `Expression.toString`, I think we should override `flatArguments` in these expressions with alias to exclude the funcName parameter. ---------------------------------------------------------------- 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]
