AngersZhuuuu commented on pull request #28836: URL: https://github.com/apache/spark/pull/28836#issuecomment-645865809
@bart-samwel @HyukjinKwon @gatorsmile One confuse, why we can't support window function in Filter condition? Support SQL like this can make some SQL more readable ``` select id, key, value from ( select id, row_number() over (partition by key order by value asc) as rn, key, value from ( select id, key, value from test_score LATERAL VIEW explode (map( 'score1', score1, 'score2', score2 'score3', score3 )) t2 as key, value ) tmp ) s where rn=1 ``` I can just write like below ``` select id, key, value from ( select id, key, value from test_score LATERAL VIEW explode (map( 'score1', score1, 'score2', score2 'score3', score3 )) t2 as key, value ) tmp ) s where row_number() over (partition by key order by value asc) = 1, ``` ---------------------------------------------------------------- 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 --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org