carbondata-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipesala <...@git.apache.org>
Subject [GitHub] carbondata pull request #1728: [CARBONDATA-1926][CARBONDATA-1927][Pre-Aggreg...
Date Fri, 29 Dec 2017 13:05:05 GMT
Github user ravipesala commented on a diff in the pull request:

    https://github.com/apache/carbondata/pull/1728#discussion_r159058689
  
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/hive/CarbonPreAggregateRules.scala
---
    @@ -294,12 +149,30 @@ case class CarbonPreAggregateQueryRules(sparkSession: SparkSession)
extends Rule
             val aggregateTableSelector = new AggregateTableSelector(queryPlan, carbonTable)
             // select the list of valid child tables
             val selectedDataMapSchemas = aggregateTableSelector.selectPreAggDataMapSchema()
    +        // query has only aggregate expression then selected data map will be empty
    +        // the validate all the child data map otherwise validate selected data map
    +        var selectedAggMaps = if (isProjectionColumnPresent) {
    +          selectedDataMapSchemas
    +        } else {
    +          carbonTable.getTableInfo.getDataMapSchemaList
    +        }
    +        val aggExpLogicalPlans = aggregateExpressions.map { queryAggExp =>
    +          getLogicalPlanFromAggExp(queryAggExp,
    +            carbonTable.getTableName,
    +            carbonTable.getDatabaseName, logicalRelation)
    +        }.toSeq
    +        if(aggregateExpressions.size > 0 && selectedAggMaps.size > 0) {
    --- End diff --
    
    add comments


---

Mime
View raw message