File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
sql/core/src/main/scala/org/apache/spark/sql/parquet Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -191,7 +191,10 @@ case class ParquetRelation2(path: String)(@transient val sqlContext: SQLContext)
191191 val selectedPartitions = partitions.filter(p => partitionFilters.forall(_(p)))
192192 val fs = FileSystem .get(new java.net.URI (path), sparkContext.hadoopConfiguration)
193193 val selectedFiles = selectedPartitions.flatMap(_.files).map(f => fs.makeQualified(f.getPath))
194- org.apache.hadoop.mapreduce.lib.input.FileInputFormat .setInputPaths(job, selectedFiles:_* )
194+ // FileInputFormat cannot handle empty lists.
195+ if (selectedFiles.nonEmpty) {
196+ org.apache.hadoop.mapreduce.lib.input.FileInputFormat .setInputPaths(job, selectedFiles : _* )
197+ }
195198
196199 // Push down filters when possible
197200 predicates
You can’t perform that action at this time.
0 commit comments