LantaoJin commented on a change in pull request #29062:
URL: https://github.com/apache/spark/pull/29062#discussion_r465523230
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -200,18 +200,18 @@ class Analyzer(
val postHocResolutionRules: Seq[Rule[LogicalPlan]] = Nil
lazy val batches: Seq[Batch] = Seq(
+ Batch("Substitution", fixedPoint,
Review comment:
I don't know which PR causes this regression problem since there is a
big gap between 2.4 and 3.0 about CTE. I am not familiar with this part.
I fixed this by debuging. In 3.0, I found only the `child of CTE` could
enter into the rule of `ResolveCoalesceHints`
For the above test case:
```
CTE [cte]
: +- 'SubqueryAlias `cte`
: +- 'UnresolvedHint REPARTITION, [3]
: +- 'Project [*]
: +- 'UnresolvedRelation `t`
+- 'Project [*]
+- 'UnresolvedRelation `cte`
```
Only this child `Project` branch could enter into the rule of
`ResolveCoalesceHints`
```
+- 'Project [*]
+- 'UnresolvedRelation `cte`
```
----------------------------------------------------------------
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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]