Github user davies commented on a diff in the pull request: https://github.com/apache/spark/pull/10581#discussion_r48898645 --- Diff: sql/core/src/main/java/org/apache/spark/sql/execution/datasources/parquet/SpecificParquetRecordReaderBase.java --- @@ -125,20 +129,80 @@ public void initialize(InputSplit inputSplit, TaskAttemptContext taskAttemptCont + " in range " + split.getStart() + ", " + split.getEnd()); } } - MessageType fileSchema = footer.getFileMetaData().getSchema(); + this.fileSchema = footer.getFileMetaData().getSchema(); Map<String, String> fileMetadata = footer.getFileMetaData().getKeyValueMetaData(); - this.readSupport = getReadSupportInstance( + ReadSupport<T> readSupport = getReadSupportInstance( (Class<? extends ReadSupport<T>>) getReadSupportClass(configuration)); ReadSupport.ReadContext readContext = readSupport.init(new InitContext( taskAttemptContext.getConfiguration(), toSetMultiMap(fileMetadata), fileSchema)); this.requestedSchema = readContext.getRequestedSchema(); - this.fileSchema = fileSchema; + this.sparkSchema = new CatalystSchemaConverter(configuration).convert(requestedSchema); this.reader = new ParquetFileReader(configuration, file, blocks, requestedSchema.getColumns()); for (BlockMetaData block : blocks) { this.totalRowCount += block.getRowCount(); } } + /** + * Returns the list of files at 'path' recursively. This skips files that are ignored normally + * by MapReduce. + */ + public static List<String> listDirectory(File path) throws IOException { --- End diff -- Is this only used by tests?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org