From 56f3401b6a2c162e9087f705833b6d46f71f4d33 Mon Sep 17 00:00:00 2001 From: Sumeet Varma Date: Thu, 28 Mar 2024 14:36:38 -0700 Subject: [PATCH] Update log --- .../src/main/scala/org/apache/spark/sql/delta/DeltaLog.scala | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spark/src/main/scala/org/apache/spark/sql/delta/DeltaLog.scala b/spark/src/main/scala/org/apache/spark/sql/delta/DeltaLog.scala index 9310f7fac3e..04f37ebd23c 100644 --- a/spark/src/main/scala/org/apache/spark/sql/delta/DeltaLog.scala +++ b/spark/src/main/scala/org/apache/spark/sql/delta/DeltaLog.scala @@ -447,7 +447,9 @@ class DeltaLog private( // we will verify below because we're paranoid about buggy FileSystem implementations. (fs.mkdirs(path), None) } catch { - // Only needed because buggy Hadoop FileSystem.mkdir wrongly throws on existing dir. + // A FileAlreadyExistsException is expected if a non-directory object exists but an explicit + // check is needed because buggy Hadoop FileSystem.mkdir wrongly throws the exception even + // on existing directories. case io: IOException => val dirExists = try {