Repository: spark
Updated Branches:
  refs/heads/master 45d8f4dea -> b7c89a7f0


[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


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

Branch: refs/heads/master
Commit: b7c89a7f0ca73153dce36e0f01b81a3947ee1189
Parents: 45d8f4d
Author: chutium <[email protected]>
Authored: Fri Aug 8 13:31:08 2014 -0700
Committer: Michael Armbrust <[email protected]>
Committed: Fri Aug 8 13:31:08 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/b7c89a7f/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