Github user xuchuanyin commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2627#discussion_r210202351 --- Diff: datamap/mv/core/src/main/scala/org/apache/carbondata/mv/datamap/MVHelper.scala --- @@ -80,6 +81,16 @@ object MVHelper { dmProperties.foreach(t => tableProperties.put(t._1, t._2)) val selectTables = getTables(logicalPlan) + selectTables.map { selectTable => + val mainCarbonTable = CarbonEnv.getCarbonTableOption(selectTable.identifier.database, + selectTable.identifier.table)(sparkSession) + + if (!mainCarbonTable.isEmpty && mainCarbonTable.get.isStreamingSink ) { + throw new MalformedCarbonCommandException(s"Streaming table does not support creating " + + s"MV datamap") + } + selectTable --- End diff -- This is useless and can be removed
---