ajantha-bhat commented on a change in pull request #3437: [CARBONDATA-3530] 
Support Create timeseries MV Datamap with the supported granularity levels.
URL: https://github.com/apache/carbondata/pull/3437#discussion_r346139570
 
 

 ##########
 File path: 
datamap/mv/core/src/main/scala/org/apache/carbondata/mv/datamap/MVAnalyzerRule.scala
 ##########
 @@ -82,9 +89,19 @@ class MVAnalyzerRule(sparkSession: SparkSession) extends 
Rule[LogicalPlan] {
         }
         Aggregate(grp, aExp, child)
     }
-    val catalog = 
DataMapStoreManager.getInstance().getDataMapCatalog(dataMapProvider,
-      DataMapClassProvider.MV.getShortName).asInstanceOf[SummaryDatasetCatalog]
-    if (needAnalysis && catalog != null && isValidPlan(plan, catalog)) {
+    val summaryDataSetCatalog: java.util.List[SummaryDatasetCatalog] = new util
+    .ArrayList[SummaryDatasetCatalog]()
+    dataMapProvider.asScala.foreach(dataMapProvider =>
+      summaryDataSetCatalog.add(
+        DataMapStoreManager.getInstance().getDataMapCatalog(dataMapProvider,
+          
dataMapProvider.getDataMapSchema.getProviderName).asInstanceOf[SummaryDatasetCatalog]))
+    var catalog: SummaryDatasetCatalog = null
+    summaryDataSetCatalog.asScala.foreach { summaryDataSetCatalog =>
+      if (summaryDataSetCatalog != null && isValidPlan(plan, 
summaryDataSetCatalog)) {
+        catalog = summaryDataSetCatalog
 
 Review comment:
   if more than one SummaryDatasetCatalog is valid plan from catalogList (like 
mv and mv timeseries), here we are updating with the last one. please check

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to