File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1818package org .apache .spark .sql .catalyst .analysis
1919
2020import org .apache .spark .sql .catalyst .expressions .Alias
21- import org .apache .spark .sql .catalyst .plans .logical .{LogicalPlan , Project , View }
21+ import org .apache .spark .sql .catalyst .plans .logical .{AnalysisHelper , LogicalPlan , Project , View }
2222import org .apache .spark .sql .catalyst .rules .Rule
2323
2424/**
@@ -53,7 +53,14 @@ import org.apache.spark.sql.catalyst.rules.Rule
5353 * completely resolved during the batch of Resolution.
5454 */
5555object EliminateView extends Rule [LogicalPlan ] with CastSupport {
56- override def apply (plan : LogicalPlan ): LogicalPlan = plan transformUp {
56+ // Temporary fix until https://github.com/apache/spark/pull/31368 is merged.
57+ override def apply (plan : LogicalPlan ): LogicalPlan = {
58+ AnalysisHelper .allowInvokingTransformsInAnalyzer {
59+ applyInternal(plan)
60+ }
61+ }
62+
63+ private def applyInternal (plan : LogicalPlan ): LogicalPlan = plan transformUp {
5764 // The child has the different output attributes with the View operator. Adds a Project over
5865 // the child of the view.
5966 case v @ View (Some (desc), _, output, child) if child.resolved && ! v.sameOutput(child) =>
You can’t perform that action at this time.
0 commit comments