diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/resolver/HybridAnalyzer.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/resolver/HybridAnalyzer.scala index 4ebcb3e06b178..039c07f5edbc2 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/resolver/HybridAnalyzer.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/resolver/HybridAnalyzer.scala @@ -75,9 +75,6 @@ class HybridAnalyzer( } } - private def checkResolverGuard(plan: LogicalPlan): Boolean = - !checkSupportedSinglePassFeatures || resolverGuard.apply(plan) - def getSinglePassResolutionDuration: Option[Long] = singlePassResolutionDuration def getFixedPointResolutionDuration: Option[Long] = fixedPointResolutionDuration @@ -218,6 +215,9 @@ class HybridAnalyzer( NormalizePlan(plan) } + private def checkResolverGuard(plan: LogicalPlan): Boolean = + !checkSupportedSinglePassFeatures || resolverGuard.apply(plan) + private def recordDuration[T](thunk: => T): (Long, T) = { val start = System.nanoTime() val res = thunk diff --git a/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala b/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala index 306058fb3681e..be883b2112d19 100644 --- a/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala +++ b/sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala @@ -264,15 +264,17 @@ object SQLConf { .booleanConf .createWithDefault(false) - val ANALYZER_DUAL_RUN_LEGACY_AND_SINGLE_PASS_RESOLVER = - buildConf("spark.sql.analyzer.singlePassResolver.dualRunWithLegacy") - .internal() - .doc("When true, run both analyzers to check if single-pass Analyzer correctly produces" + - " the same analyzed plan as the fixed-point Analyzer for the existing set of features" + - " defined in the ResolverGuard") - .version("4.0.0") - .booleanConf - .createWithDefault(false) + val ANALYZER_DUAL_RUN_LEGACY_AND_SINGLE_PASS_RESOLVER = + buildConf("spark.sql.analyzer.singlePassResolver.dualRunWithLegacy") + .internal() + .doc( + "When true, run both analyzers to check if single-pass Analyzer correctly produces " + + "the same analyzed plan as the fixed-point Analyzer for the existing set of features " + + "defined in the ResolverGuard" + ) + .version("4.0.0") + .booleanConf + .createWithDefault(false) val ANALYZER_SINGLE_PASS_RESOLVER_VALIDATION_ENABLED = buildConf("spark.sql.analyzer.singlePassResolver.validationEnabled")