Indhumathi27 commented on a change in pull request #3497: [CARBONDATA-3602]Fix MV issues with session level operations
URL:
https://github.com/apache/carbondata/pull/3497#discussion_r355237949
##########
File path: datamap/mv/core/src/main/scala/org/apache/carbondata/mv/datamap/MVAnalyzerRule.scala
##########
@@ -83,8 +83,16 @@ class MVAnalyzerRule(sparkSession: SparkSession) extends Rule[LogicalPlan] {
}
Aggregate(grp, aExp, child)
}
- val catalog = DataMapStoreManager.getInstance().getDataMapCatalog(dataMapProvider,
+ var catalog = DataMapStoreManager.getInstance().getDataMapCatalog(dataMapProvider,
DataMapClassProvider.MV.getShortName).asInstanceOf[SummaryDatasetCatalog]
+ // when first time DataMapCatalogs are initialized, it stores session info also, but when carbon
+ // session is newly created, catalog map will not be cleared, so if session info is different,
+ // remove the entry from map.
+ if (catalog != null && !catalog.mvSession.sparkSession.equals(sparkSession)) {
Review comment:
If in case needAnalysis is false, can we skip this part for the corresponding query?
----------------------------------------------------------------
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