huangpengtao00-dotcom commented on PR #59293:
URL: https://github.com/apache/spark/pull/59293#issuecomment-6171713402

   Thanks for the re-review. Addressed both in 2ff0359b:
   
   1. The `Pivot` case now expands the aggregates first and rejects any star 
still present, with `invalidStarUsageError("Pivot", ...)` under `withPosition`, 
so a bare `*` and a star used as the value of a top-level `IN` go through the 
same check. Added an `AnalysisSuite` test for `* IN (1, 2)` with unresolved 
grouping and pivot columns; with the check reverted it fails with 
`UNRESOLVED_COLUMN.WITH_SUGGESTION`.
   2. Added `count(DISTINCT *)` and `max(struct(*))` cases to `pivot.sql` and 
regenerated the golden files. As you noted, `count(DISTINCT *)` returns a 
single row because every column, including the pivot column, drops out of the 
implicit grouping. I also added both rejected shapes there, so the golden files 
pin the error to the pivot star rather than the `SELECT *`.
   
   The description is updated to match.
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to