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

    https://github.com/apache/carbondata/pull/2594#discussion_r207462265
  
    --- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonDataMapRebuildCommand.scala
 ---
    @@ -48,7 +50,17 @@ case class CarbonDataMapRebuildCommand(
             )(sparkSession)
         }
         val provider = DataMapManager.get().getDataMapProvider(table, schema, 
sparkSession)
    -    provider.rebuild()
    +    // for non-lazy index datamap, the data of datamap will be generated 
immediately after
    +    // the datamap is created or the main table is loaded, so there is no 
need to
    +    // rebuild this datamap.
    +    if (!schema.isLazy && provider.isInstanceOf[IndexDataMapProvider]) {
    --- End diff --
    
    OK.


---

Reply via email to