dtenedor commented on code in PR #48047:
URL: https://github.com/apache/spark/pull/48047#discussion_r1756076416


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -2727,6 +2727,12 @@ class Analyzer(override val catalogManager: 
CatalogManager) extends RuleExecutor
       t => t.containsAnyPattern(AGGREGATE_EXPRESSION, PYTHON_UDF) && 
t.containsPattern(PROJECT),
       ruleId) {
       case Project(projectList, child) if containsAggregates(projectList) =>
+        if (child.isInstanceOf[PipeOperatorSelect]) {

Review Comment:
   I tried this but it was more complex than I had hoped. I ended up switching 
the implementation to make the `PipeOperatorSelect` a temporary expression 
instead, that checks its children for aggregate functions at the end of 
analysis. This seems to work without creating any new analyzer rule.



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