kumarvishal09 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_r347129457
##########
File path: core/src/main/java/org/apache/carbondata/core/datamap/DataMapStoreManager.java
##########
@@ -233,19 +235,21 @@ public void updateDataMapSchema(List<DataMapSchema> dataMapSchemaList,
* @param dataMapProvider
* @param dataMapSchema
*/
- public synchronized void registerDataMapCatalog(DataMapProvider dataMapProvider,
+ public void registerDataMapCatalog(DataMapProvider dataMapProvider,
DataMapSchema dataMapSchema) throws IOException {
- initializeDataMapCatalogs(dataMapProvider);
- String name = dataMapSchema.getProviderName();
- DataMapCatalog dataMapCatalog = dataMapCatalogs.get(name);
- if (dataMapCatalog == null) {
- dataMapCatalog = dataMapProvider.createDataMapCatalog();
- if (dataMapCatalog != null) {
- dataMapCatalogs.put(name.toLowerCase(), dataMapCatalog);
+ synchronized (lockObject) {
+ initializeDataMapCatalogs(dataMapProvider);
+ String name = dataMapSchema.getProviderName().toLowerCase();
+ DataMapCatalog dataMapCatalog = dataMapCatalogs.get(name);
+ if (dataMapCatalog == null) {
+ dataMapCatalog = dataMapProvider.createDataMapCatalog();
+ if (dataMapCatalog != null) {
Review comment:
here if dataMapCatlog is still null Line 246 then it will not register the data map schema is it intentional, can please add some comments
----------------------------------------------------------------
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