Skip to content
Snippets Groups Projects
Commit 0dfc1ec5 authored by Liang-Chi Hsieh's avatar Liang-Chi Hsieh Committed by hyukjinkwon
Browse files

[SPARK-21726][SQL][FOLLOW-UP] Check for structural integrity of the plan in Optimzer in test mode

## What changes were proposed in this pull request?

The condition in `Optimizer.isPlanIntegral` is wrong. We should always return `true` if not in test mode.

## How was this patch tested?

Manually test.

Author: Liang-Chi Hsieh <viirya@gmail.com>

Closes #19161 from viirya/SPARK-21726-followup.
parent dbb82412
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ abstract class Optimizer(sessionCatalog: SessionCatalog) ...@@ -41,7 +41,7 @@ abstract class Optimizer(sessionCatalog: SessionCatalog)
// Check for structural integrity of the plan in test mode. Currently we only check if a plan is // Check for structural integrity of the plan in test mode. Currently we only check if a plan is
// still resolved after the execution of each rule. // still resolved after the execution of each rule.
override protected def isPlanIntegral(plan: LogicalPlan): Boolean = { override protected def isPlanIntegral(plan: LogicalPlan): Boolean = {
Utils.isTesting && plan.resolved !Utils.isTesting || plan.resolved
} }
protected def fixedPoint = FixedPoint(SQLConf.get.optimizerMaxIterations) protected def fixedPoint = FixedPoint(SQLConf.get.optimizerMaxIterations)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment