carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jackylk <...@git.apache.org>
Subject [GitHub] carbondata pull request #1563: [CARBONDATA-1592] Refactored CarbonSession
Date Wed, 29 Nov 2017 07:43:46 GMT
Github user jackylk commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1563#discussion_r153711458
  
    --- Diff: integration/spark2/src/main/spark2.1/CarbonSessionState.scala ---
    @@ -147,22 +150,31 @@ class CarbonSessionState(sparkSession: SparkSession) extends HiveSessionState(sp
     
       override lazy val optimizer: Optimizer = new CarbonOptimizer(catalog, conf, experimentalMethods)
     
    +  def extendedAnalyzerRules: Seq[Rule[LogicalPlan]] = Nil
    +  def internalAnalyzerRules: Seq[Rule[LogicalPlan]] = {
    +    catalog.ParquetConversions ::
    +    catalog.OrcConversions ::
    +    CarbonPreInsertionCasts(sparkSession) ::
    +    CarbonPreAggregateQueryRules(sparkSession) ::
    +    CarbonIUDAnalysisRule(sparkSession) ::
    +    AnalyzeCreateTable(sparkSession) ::
    +    PreprocessTableInsertion(conf) ::
    +    DataSourceAnalysis(conf) ::
    +    (if (conf.runSQLonFile) {
    +      new ResolveDataSource(sparkSession) :: Nil
    +    } else {  Nil }
    +      )
    +  }
    +
       override lazy val analyzer: Analyzer = {
         new Analyzer(catalog, conf) {
           override val extendedResolutionRules =
    -        catalog.ParquetConversions ::
    -        catalog.OrcConversions ::
    -        CarbonPreInsertionCasts(sparkSession) ::
    -        CarbonPreAggregateQueryRules(sparkSession) ::
    -        CarbonIUDAnalysisRule(sparkSession) ::
    -        AnalyzeCreateTable(sparkSession) ::
    -        PreprocessTableInsertion(conf) ::
    -        DataSourceAnalysis(conf) ::
    -        (if (conf.runSQLonFile) {
    -          new ResolveDataSource(sparkSession) :: Nil
    -        } else {  Nil }
    -           )
    -
    +        if (!extendedAnalyzerRules.isEmpty) {
    +          extendedAnalyzerRules ++ internalAnalyzerRules
    +        }
    +        else {
    --- End diff --
    
    move to previous line


---

Mime
View raw message