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

    https://github.com/apache/carbondata/pull/2109#discussion_r178222428
  
    --- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/preaaggregate/PreAggregateTableHelper.scala
 ---
    @@ -59,8 +60,22 @@ case class PreAggregateTableHelper(
         val df = sparkSession.sql(updatedQuery)
         val fieldRelationMap = 
PreAggregateUtil.validateActualSelectPlanAndGetAttributes(
           df.logicalPlan, queryString)
    +    val partitionInfo = parentTable.getPartitionInfo
         val fields = fieldRelationMap.keySet.toSeq
         val tableProperties = mutable.Map[String, String]()
    +    val childPartitionColumns = if (partitionInfo != null &&
    +                              partitionInfo.getPartitionType == 
PartitionType.NATIVE_HIVE) {
    +      val parentPartitionColumns = 
partitionInfo.getColumnSchemaList.asScala.map(_.getColumnName)
    +      PreAggregateUtil
    +        .extractPartitionInfoForAggregateTable(df.logicalPlan, 
parentPartitionColumns)
    --- End diff --
    
    Why again require to extract the columns? Can't you get from 
fieldRelationMap


---

Reply via email to