Github user gatorsmile commented on a diff in the pull request: https://github.com/apache/spark/pull/22466#discussion_r220795446 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala --- @@ -66,6 +66,19 @@ case class CreateDatabaseCommand( extends RunnableCommand { override def run(sparkSession: SparkSession): Seq[Row] = { + // SPARK-25464 fail if DB location exists and is not empty + if (path.isDefined) { --- End diff -- Please try the following cases: - the directory does not exist and the parent directory does not exist too. - the directory exists but empty - the directory exists and non-empty - the directory is not accessible
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org