Repository: spark
Updated Branches:
  refs/heads/branch-1.1 daa090f80 -> e26450383


[SPARK-2700] [SQL] Hidden files (such as .impala_insert_staging) should be 
filtered out by sqlContext.parquetFile

Author: chutium <[email protected]>

Closes #1691 from chutium/SPARK-2700 and squashes the following commits:

b76ae8c [chutium] [SPARK-2700] [SQL] fixed styling issue
d75a8bd [chutium] [SPARK-2700] [SQL] Hidden files (such as 
.impala_insert_staging) should be filtered out by sqlContext.parquetFile

(cherry picked from commit b7c89a7f0ca73153dce36e0f01b81a3947ee1189)
Signed-off-by: Michael Armbrust <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/e2645038
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/e2645038
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/e2645038

Branch: refs/heads/branch-1.1
Commit: e264503832a331c5b1344e8343ca9834db70bb11
Parents: daa090f
Author: chutium <[email protected]>
Authored: Fri Aug 8 13:31:08 2014 -0700
Committer: Michael Armbrust <[email protected]>
Committed: Fri Aug 8 13:31:19 2014 -0700

----------------------------------------------------------------------
 .../main/scala/org/apache/spark/sql/parquet/ParquetTypes.scala  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/e2645038/sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetTypes.scala
----------------------------------------------------------------------
diff --git 
a/sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetTypes.scala 
b/sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetTypes.scala
index aaef1a1..2867dc0 100644
--- a/sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetTypes.scala
+++ b/sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetTypes.scala
@@ -373,8 +373,9 @@ private[parquet] object ParquetTypesConverter extends 
Logging {
     }
     ParquetRelation.enableLogForwarding()
 
-    val children = fs.listStatus(path).filterNot {
-      _.getPath.getName == FileOutputCommitter.SUCCEEDED_FILE_NAME
+    val children = fs.listStatus(path).filterNot { status =>
+      val name = status.getPath.getName
+      name(0) == '.' || name == FileOutputCommitter.SUCCEEDED_FILE_NAME
     }
 
     // NOTE (lian): Parquet "_metadata" file can be very slow if the file 
consists of lots of row


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to