carbondata-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [carbondata] Indhumathi27 commented on a change in pull request #4186: [CARBONDATA-4255] Prohibit Create/Drop Database when databaselocation is inconsistent
Date Fri, 30 Jul 2021 05:30:07 GMT

Indhumathi27 commented on a change in pull request #4186:
URL: https://github.com/apache/carbondata/pull/4186#discussion_r679658420



##########
File path: integration/spark/src/main/scala/org/apache/spark/sql/execution/strategy/DDLHelper.scala
##########
@@ -52,15 +54,16 @@ object DDLHelper {
     ThreadLocalSessionInfo
       .setConfigurationToCurrentThread(sparkSession.sessionState.newHadoopConf())
     if (!EnvHelper.isLegacy(sparkSession)) {
-      val databaseName = createDatabaseCommand.databaseName
-      val dbLocation = try {
-        CarbonEnv.getDatabaseLocation(databaseName, sparkSession)
-      } catch {
-        case _: NoSuchDatabaseException =>
-          CarbonProperties.getStorePath
+      val carbonStorePath = CarbonProperties.getStorePath()
+      val sparkWarehouse = sparkSession.conf.get("spark.sql.warehouse.dir")
+      if (StringUtils.isNotEmpty(carbonStorePath) && StringUtils.isNotEmpty(sparkWarehouse)

Review comment:
       do we need to fail it, when user fires create database with location ? i think, in
that case, no need to check this




-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@carbondata.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



Mime
View raw message