Skip to content

Commit e6e9061

Browse files
committed
Fix tests
1 parent 12fdbe9 commit e6e9061

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3639,6 +3639,18 @@ class Analyzer(override val catalogManager: CatalogManager)
36393639
}
36403640
}
36413641
}
3642+
3643+
/**
3644+
* A rule that calls `TransformationAfterAnalysis.transform` for a plan that needs to be
3645+
* transformed after all the analysis rules are run.
3646+
*/
3647+
object TransformAfterAnalysis extends Rule[LogicalPlan] {
3648+
override def apply(plan: LogicalPlan): LogicalPlan = plan resolveOperators {
3649+
case t: TransformationAfterAnalysis if t.resolved =>
3650+
checkAnalysis(t)
3651+
t.transform
3652+
}
3653+
}
36423654
}
36433655

36443656
/**
@@ -3703,18 +3715,6 @@ object CleanupAliases extends Rule[LogicalPlan] with AliasHelper {
37033715
}
37043716
}
37053717

3706-
/**
3707-
* A rule that calls `TransformationAfterAnalysis.transform` for a plan that needs to be transformed
3708-
* after all the analysis rules are run.
3709-
*/
3710-
object TransformAfterAnalysis extends Rule[LogicalPlan] {
3711-
override def apply(plan: LogicalPlan): LogicalPlan = plan resolveOperators {
3712-
// Transform only if the plan is resolved so that unresolved plan will
3713-
// fail in checkAnalysis.
3714-
case t: TransformationAfterAnalysis if t.resolved => t.transform
3715-
}
3716-
}
3717-
37183718
/**
37193719
* Ignore event time watermark in batch query, which is only supported in Structured Streaming.
37203720
* TODO: add this rule into analyzer rule list.

sql/core/src/test/resources/sql-tests/results/explain-aqe.sql.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ Execute CreateViewCommand (1)
913913
Output: []
914914

915915
(2) CreateViewCommand
916-
Arguments: `default`.`explain_view`, SELECT key, val FROM explain_temp1, false, false, PersistedView
916+
Arguments: `default`.`explain_view`, SELECT key, val FROM explain_temp1, false, false, PersistedView, true
917917

918918
(3) LogicalRelation
919919
Arguments: parquet, [key#x, val#x], CatalogTable(

sql/core/src/test/resources/sql-tests/results/explain.sql.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@ Execute CreateViewCommand (1)
858858
Output: []
859859

860860
(2) CreateViewCommand
861-
Arguments: `default`.`explain_view`, SELECT key, val FROM explain_temp1, false, false, PersistedView
861+
Arguments: `default`.`explain_view`, SELECT key, val FROM explain_temp1, false, false, PersistedView, true
862862

863863
(3) LogicalRelation
864864
Arguments: parquet, [key#x, val#x], CatalogTable(

0 commit comments

Comments
 (0)