Skip to content

Commit

Permalink
no need to apply MVAnalyzerRule for Command
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjmh committed Feb 12, 2019
1 parent 75d9eae commit e09ead1
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -19,7 +19,7 @@ package org.apache.spark.sql.hive
import org.apache.spark.sql.SparkSession
import org.apache.spark.sql.catalyst.analysis.Analyzer
import org.apache.spark.sql.catalyst.catalog.SessionCatalog
import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
import org.apache.spark.sql.catalyst.plans.logical.{Command, LogicalPlan}
import org.apache.spark.sql.catalyst.rules.Rule
import org.apache.spark.sql.internal.SQLConf
import org.apache.spark.util.CarbonReflectionUtils
Expand All @@ -42,10 +42,10 @@ class CarbonAnalyzer(catalog: SessionCatalog,
var logicalPlan = analyzer.execute(plan)
logicalPlan = CarbonPreAggregateDataLoadingRules(sparkSession).apply(logicalPlan)
logicalPlan = CarbonPreAggregateQueryRules(sparkSession).apply(logicalPlan)
if (mvPlan != null) {
if (mvPlan != null && !logicalPlan.isInstanceOf[Command]) {
mvPlan.apply(logicalPlan)
} else {
logicalPlan
}
}
}
}

0 comments on commit e09ead1

Please sign in to comment.