Github user arina-ielchiieva commented on a diff in the pull request: https://github.com/apache/drill/pull/1083#discussion_r160526940 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java --- @@ -250,20 +250,12 @@ private boolean metaDataFileExists(FileSystem fs, FileStatus dir) throws IOExcep } boolean isDirReadable(DrillFileSystem fs, FileStatus dir) { - Path p = new Path(dir.getPath(), ParquetFileWriter.PARQUET_METADATA_FILE); try { - if (fs.exists(p)) { - return true; - } else { - - if (metaDataFileExists(fs, dir)) { - return true; - } - List<FileStatus> statuses = DrillFileSystemUtil.listFiles(fs, dir.getPath(), false); - return !statuses.isEmpty() && super.isFileReadable(fs, statuses.get(0)); - } + // There should be at least one file, which is readable by Drill + List<FileStatus> statuses = DrillFileSystemUtil.listFiles(fs, dir.getPath(), false); + return !statuses.isEmpty() && super.isFileReadable(fs, statuses.get(0)); --- End diff -- Why did you remove `metaDataFileExists(fs, dir)` check? `DrillFileSystemUtil` won't list dot files. Plus it seems you break the assumptions highlighted in `isReadable` method above.
---