wangyum opened a new pull request #25486: [MINOR] Make analysis error messages more meaningful URL: https://github.com/apache/spark/pull/25486 ## What changes were proposed in this pull request? This PR makes analysis error messages more meaningful when the function does not support the modifier DISTINCT: ```sql postgres=# select upper(distinct a) from (values('a'), ('b')) v(a); ERROR: DISTINCT specified, but upper is not an aggregate function LINE 1: select upper(distinct a) from (values('a'), ('b')) v(a); spark-sql> select upper(distinct a) from (values('a'), ('b')) v(a); Error in query: upper does not support the modifier DISTINCT; line 1 pos 7 spark-sql> ``` After this pr: ```sql spark-sql> select upper(distinct a) from (values('a'), ('b')) v(a); Error in query: DISTINCT specified, but upper is not an aggregate function; line 1 pos 7 spark-sql> ``` ## How was this patch tested? Unit test
---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org