Github user xuchuanyin commented on a diff in the pull request:
https://github.com/apache/carbondata/pull/2627#discussion_r210206238
--- Diff:
integration/spark2/src/main/scala/org/apache/spark/sql/execution/command/datamap/CarbonCreateDataMapCommand.scala
---
@@ -73,13 +73,8 @@ case class CarbonCreateDataMapCommand(
}
}
- if (mainTable != null &&
- mainTable.isStreamingSink &&
-
!(dmProviderName.equalsIgnoreCase(DataMapClassProvider.PREAGGREGATE.toString)
- ||
dmProviderName.equalsIgnoreCase(DataMapClassProvider.TIMESERIES.toString))) {
- throw new MalformedCarbonCommandException(s"Streaming table does not
support creating " +
- s"$dmProviderName datamap")
- }
+ // delete this code because streaming table only does not support
creating MV datamap,
--- End diff --
These two statement can be optimized to
```
// Carbondata support index/preagg datamap on streaming table and does not
support MV on streaming table.
// It will be blocked when we parse the original table of the query
statement of MV, refer to CARBONDATA-2835
```
---