spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cloud-fan <>
Subject [GitHub] spark pull request #15993: [SPARK-18050][SQL] do not create default database...
Date Thu, 24 Nov 2016 02:10:40 GMT
Github user cloud-fan commented on a diff in the pull request:
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/internal/SharedState.scala ---
    @@ -92,8 +92,12 @@ private[sql] class SharedState(val sparkContext: SparkContext) extends
Logging {
         val defaultDbDefinition = CatalogDatabase(
           SessionCatalog.DEFAULT_DATABASE, "default database", warehousePath, Map())
    -    // Initialize default database if it doesn't already exist
    -    externalCatalog.createDatabase(defaultDbDefinition, ignoreIfExists = true)
    +    // Initialize default database if it doesn't exist
    +    if (!externalCatalog.databaseExists(SessionCatalog.DEFAULT_DATABASE)) {
    --- End diff --
    checking existence and then creating database is not atomic. It's ok here because we can't
drop default database, but it may not work for general `createDatabase`

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message