Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
imback82 committed Apr 2, 2021
1 parent 12fdbe9 commit e6e9061
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3639,6 +3639,18 @@ class Analyzer(override val catalogManager: CatalogManager)
}
}
}

/**
* A rule that calls `TransformationAfterAnalysis.transform` for a plan that needs to be
* transformed after all the analysis rules are run.
*/
object TransformAfterAnalysis extends Rule[LogicalPlan] {
override def apply(plan: LogicalPlan): LogicalPlan = plan resolveOperators {
case t: TransformationAfterAnalysis if t.resolved =>
checkAnalysis(t)
t.transform
}
}
}

/**
Expand Down Expand Up @@ -3703,18 +3715,6 @@ object CleanupAliases extends Rule[LogicalPlan] with AliasHelper {
}
}

/**
* A rule that calls `TransformationAfterAnalysis.transform` for a plan that needs to be transformed
* after all the analysis rules are run.
*/
object TransformAfterAnalysis extends Rule[LogicalPlan] {
override def apply(plan: LogicalPlan): LogicalPlan = plan resolveOperators {
// Transform only if the plan is resolved so that unresolved plan will
// fail in checkAnalysis.
case t: TransformationAfterAnalysis if t.resolved => t.transform
}
}

/**
* Ignore event time watermark in batch query, which is only supported in Structured Streaming.
* TODO: add this rule into analyzer rule list.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ Execute CreateViewCommand (1)
Output: []

(2) CreateViewCommand
Arguments: `default`.`explain_view`, SELECT key, val FROM explain_temp1, false, false, PersistedView
Arguments: `default`.`explain_view`, SELECT key, val FROM explain_temp1, false, false, PersistedView, true

(3) LogicalRelation
Arguments: parquet, [key#x, val#x], CatalogTable(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ Execute CreateViewCommand (1)
Output: []

(2) CreateViewCommand
Arguments: `default`.`explain_view`, SELECT key, val FROM explain_temp1, false, false, PersistedView
Arguments: `default`.`explain_view`, SELECT key, val FROM explain_temp1, false, false, PersistedView, true

(3) LogicalRelation
Arguments: parquet, [key#x, val#x], CatalogTable(
Expand Down

0 comments on commit e6e9061

Please sign in to comment.