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

    https://github.com/apache/carbondata/pull/3045#discussion_r245274147
  
    --- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/preaaggregate/PreAggregateTableHelper.scala
 ---
    @@ -110,22 +109,42 @@ case class PreAggregateTableHelper(
         // Datamap table name and columns are automatically added prefix with 
parent table name
         // in carbon. For convenient, users can type column names same as the 
ones in select statement
         // when config dmproperties, and here we update column names with 
prefix.
    -    val longStringColumn = 
tableProperties.get(CarbonCommonConstants.LONG_STRING_COLUMNS)
    +    // If longStringColumn is not present in dmproperties then we take 
long_string_columns from
    +    // the parent table.
    +    var longStringColumn = 
tableProperties.get(CarbonCommonConstants.LONG_STRING_COLUMNS)
    +    val longStringColumnInParents = 
parentTable.getTableInfo.getFactTable.getTableProperties.asScala
    +      .getOrElse(CarbonCommonConstants.LONG_STRING_COLUMNS, 
"").split(",").map(_.trim)
    +    var varcharDatamapFields = ""
    +    fieldRelationMap foreach (fields => {
    +      val aggFunc = fields._2.aggregateFunction
    +      if (aggFunc == "") {
    --- End diff --
    
    add if(fields._2.aggregateFunction.isEmpty && 
fields._2.columnTableRelationList.size==1 && 
longStringColumnInParents.contains(fields._2.columnTableRelationList.head.parentColumnName))
 {
    
    }


---

Reply via email to