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_r346139718
##########
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
+ }
+ }
+ if (needAnalysis && catalog != null) {
Review comment:
I think we need to loop through and handle all the valid catalogs here
----------------------------------------------------------------
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:
[hidden email]
With regards,
Apache Git Services