Skip to content

Commit b7c89a7

Browse files
chutiummarmbrus
authored andcommitted
[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
1 parent 45d8f4d commit b7c89a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

sql/core/src/main/scala/org/apache/spark/sql/parquet/ParquetTypes.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,9 @@ private[parquet] object ParquetTypesConverter extends Logging {
373373
}
374374
ParquetRelation.enableLogForwarding()
375375

376-
val children = fs.listStatus(path).filterNot {
377-
_.getPath.getName == FileOutputCommitter.SUCCEEDED_FILE_NAME
376+
val children = fs.listStatus(path).filterNot { status =>
377+
val name = status.getPath.getName
378+
name(0) == '.' || name == FileOutputCommitter.SUCCEEDED_FILE_NAME
378379
}
379380

380381
// NOTE (lian): Parquet "_metadata" file can be very slow if the file consists of lots of row

0 commit comments

Comments
 (0)