Github user gvramana commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1623#discussion_r155484388
  
    --- Diff: integration/spark2/src/main/spark2.2/CarbonSessionState.scala ---
    @@ -176,31 +178,40 @@ class CarbonSessionStateBuilder(sparkSession: 
SparkSession,
     
       override lazy val optimizer: Optimizer = new CarbonOptimizer(catalog, 
conf, experimentalMethods)
     
    +  def extendedAnalyzerRules: Seq[Rule[LogicalPlan]] = Nil
    +
    +  def internalAnalyzerRules: Seq[Rule[LogicalPlan]] = {
    +    new ResolveHiveSerdeTable(session) +:
    +    new FindDataSourceTable(session) +:
    +    new ResolveSQLOnFile(session) +:
    +    new CarbonIUDAnalysisRule(sparkSession) +:
    +    new CarbonPreAggregateQueryRules(sparkSession) +:
    +    new CarbonPreInsertionCasts(sparkSession) +: customResolutionRules
    +  }
    +
       override protected def analyzer: Analyzer = {
    -    new Analyzer(catalog, conf) {
    -
    -      override val extendedResolutionRules: Seq[Rule[LogicalPlan]] =
    -        new ResolveHiveSerdeTable(session) +:
    -        new FindDataSourceTable(session) +:
    -        new ResolveSQLOnFile(session) +:
    -        new CarbonIUDAnalysisRule(sparkSession) +:
    -        new CarbonPreAggregateQueryRules(sparkSession) +:
    -        new CarbonPreInsertionCasts(sparkSession) +: customResolutionRules
    -
    -      override val extendedCheckRules: Seq[LogicalPlan => Unit] =
    -      PreWriteCheck :: HiveOnlyCheck :: Nil
    -
    -      override val postHocResolutionRules: Seq[Rule[LogicalPlan]] =
    -        new DetermineTableStats(session) +:
    -        RelationConversions(conf, catalog) +:
    -        PreprocessTableCreation(session) +:
    -        PreprocessTableInsertion(conf) +:
    -        DataSourceAnalysis(conf) +:
    -        HiveAnalysis +:
    -        customPostHocResolutionRules
    -    }
    +      new Analyzer(catalog, conf) {
    --- End diff --
    
    Use customResolutionRules , not required to add extra interface


---

Reply via email to