GuoPhilipse commented on pull request #29126: URL: https://github.com/apache/spark/pull/29126#issuecomment-659393021
> I don't dig into it though, probably the second case is matched in `querySpecification`: > https://github.com/apache/spark/blob/db47c6e340a63100d7c0e85abf237adc4e2174cc/sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4#L501-L502 emmm, if so, when our user execute the following sql and get expected result, they may think `PIVOT` Clause and work together with `lateral ` clause, we may make it more clear in SqlBase.g4 or error notification ? WDYT? ``` SELECT * FROM person PIVOT ( count(distinct age) as a for name in ('Mary','John') ) lateral view outer explode(array(30,60)) tabelName as c_age lateral view explode(array(40,80)) as d_age ``` ---------------------------------------------------------------- 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