You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@carbondata.apache.org by kunal642 <gi...@git.apache.org> on 2018/04/20 10:40:12 UTC

[GitHub] carbondata pull request #2172: [CARBONDATA-2333] Add validation for drop par...

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

    https://github.com/apache/carbondata/pull/2172#discussion_r183012262
  
    --- Diff: integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/preaaggregate/PreAggregateTableHelper.scala ---
    @@ -73,18 +74,9 @@ case class PreAggregateTableHelper(
           Seq()
         }
         // Generate child table partition columns in the same order as the parent table.
    -    val partitionerFields = fieldRelationMap.collect {
    -      case (field, dataMapField) if parentPartitionColumns
    -        .exists(parentCol =>
    -          /* For count(*) while Pre-Aggregate table creation,columnTableRelationList was null */
    -          dataMapField.columnTableRelationList.getOrElse(Seq()).nonEmpty &&
    -            parentCol.equals(dataMapField.columnTableRelationList.get.head.parentColumnName) &&
    -          dataMapField.aggregateFunction.isEmpty) =>
    -        (PartitionerField(field.name.get,
    -          field.dataType,
    -          field.columnComment), parentPartitionColumns
    -          .indexOf(dataMapField.columnTableRelationList.get.head.parentColumnName))
    -    }.toSeq.sortBy(_._2).map(_._1)
    +    val partitionerFields =
    +      PartitionUtils.getPartitionerFields(parentPartitionColumns, fieldRelationMap)
    --- End diff --
    
    fixed


---