wForget commented on PR #43867:
URL: https://github.com/apache/spark/pull/43867#issuecomment-1820797743
> Since we run all analyzer rules before marking it as analyzed, we should
be fine. But `CheckAnalysis` is the only missing piece I think.
It seems to affect some subsequent rules, like the failed test case
`org.apache.spark.sql.SubquerySuite."having with function in subquery"`:
```
test("having with function in subquery") {
checkAnswer(
sql("select a from l group by 1 having exists (select 1 from r where d
< min(b))"),
Row(null) :: Row(1) :: Row(3) :: Nil)
}
```
`UnresolvedHaving.havingCondition` is a subquery, marked as `resloved` after
applying `Analyzer.ResolveSubquery`, if we mark it as `analyzed`,
`UpdateOuterReferences#updateOuterReferenceInSubquery` will not take effect
because it uses `plan resolveExpressions`.
--
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]