Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5415#discussion_r167848724
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java ---
    @@ -404,9 +486,39 @@ public FileBaseStatistics getStatistics(BaseStatistics 
cachedStats) throws IOExc
                return null;
        }
        
    -   protected FileBaseStatistics getFileStats(FileBaseStatistics 
cachedStats, Path filePath, FileSystem fs,
    -                   ArrayList<FileStatus> files) throws IOException {
    -           
    +   protected FileBaseStatistics getFileStats(FileBaseStatistics 
cachedStats, Path[] filePaths, ArrayList<FileStatus> files) throws IOException {
    +
    +           // shortcut for a single path that preserves cached stats
    +           if (filePaths.length == 1) {
    --- End diff --
    
    not sure if this optimization is really worth it


---

Reply via email to