Skip to content

Commit bd2040a

Browse files
committed
Add comment explaining the hack
1 parent dbf9e58 commit bd2040a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/command/createDataSourceTables.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ case class CreateDataSourceTableCommand(
105105
bucketSpec = None,
106106
options = optionsWithPath).resolveRelation(checkPathExist = false)
107107
} catch {
108+
// Note that since the table hasn't been created yet, ListingFileCatalog.refresh()
109+
// (which gets called in ListingFileCatalog's constructor, invoked in resolveRelation)
110+
// will fail with FileNotFoundException (or SparkException in the parallel version).
108111
case e: FileNotFoundException => // Do nothing
109112
case e: SparkException if e.getMessage.contains("FileNotFoundException") => // Do nothing
110113
case e: Throwable => throw e

0 commit comments

Comments
 (0)