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

    https://github.com/apache/carbondata/pull/2609#discussion_r208112885
  
    --- Diff: 
integration/spark2/src/main/scala/org/apache/spark/sql/execution/strategy/DDLStrategy.scala
 ---
    @@ -257,20 +256,13 @@ class DDLStrategy(sparkSession: SparkSession) extends 
SparkStrategy {
             if CarbonEnv.getInstance(sparkSession).carbonMetastore
               .tableExists(tableName)(sparkSession) => {
     
    -        // TODO remove this limiation after streaming table support 
'preaggregate' DataMap
    -        // if the table has 'preaggregate' DataMap, it doesn't support 
streaming now
             val carbonTable = 
CarbonEnv.getInstance(sparkSession).carbonMetastore
               
.lookupRelation(tableName)(sparkSession).asInstanceOf[CarbonRelation].carbonTable
             if (carbonTable != null && 
!carbonTable.getTableInfo.isTransactionalTable) {
               throw new MalformedCarbonCommandException(
                 "Unsupported operation on non transactional table")
             }
     
    -        if (carbonTable != null && !carbonTable.canAllow(carbonTable, 
TableOperation.STREAMING)) {
    --- End diff --
    
    In the previous implementation, the `CarbonTable.canAllow` will only works 
on the datamaps returned by `DataMapStorageManager.getInstance().getAllDataMap` 
which are all index datamap.
    
    Here the removed code means that there is no restriction for index map now, 
so I think the modification do not affect the previous procedure.
    
    As you mentioned about MV, maybe it is already a bug there.


---

Reply via email to