viirya commented on issue #25215: [SPARK-28445][SQL][PYTHON] Fix error when PythonUDF is used in both group by and aggregate expression URL: https://github.com/apache/spark/pull/25215#issuecomment-518884995 @shivusondur @HyukjinKwon The analysis exception by adding udf to group by, is caused by SPARK-28386, SPARK-26741. ``` == Analyzed Logical Plan == org.apache.spark.sql.AnalysisException: cannot resolve '`b`' given input columns: [CAST(udf(cast(b as string)) AS INT), CAST(udf(cast(c as string)) AS STRING)]; line 2 pos 63; 'Sort ['udf('b) ASC NULLS FIRST, 'udf('c) ASC NULLS FIRST], true +- Project [CAST(udf(cast(b as string)) AS INT)#x, CAST(udf(cast(c as string)) AS STRING)#x] +- Filter (cast(udf(cast(count(1)#xL as string)) as bigint) = cast(1 as bigint)) +- Aggregate [cast(udf(cast(b#x as string)) as int), cast(udf(cast(c#x as string)) as string)], [cast(udf(cast(b#x as string)) as int) AS CAST(udf(cast(b as string)) AS INT)#x, cast(udf(cast(c#x as string)) as string) AS CAST(udf(cast(c as string)) AS STRING)#x, count(1) AS count(1)#xL] +- SubqueryAlias `default`.`test_having` +- Relation[a#x,b#x,c#x,d#x] parquet ```
---------------------------------------------------------------- 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]
