amansinha100 commented on a change in pull request #1748: DRILL-7171: Create
metadata directories cache file in the leaf level directories to support
ConvertCountToDirectScan optimization.
URL: https://github.com/apache/drill/pull/1748#discussion_r275170738
##########
File path:
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/metadata/Metadata.java
##########
@@ -353,22 +353,15 @@ private static boolean
ignoreReadingMetadata(MetadataContext metaContext, Path p
writeFile(metadataTableWithRelativePaths.getSummary(), new Path(path,
METADATA_SUMMARY_FILENAME), fs);
Metadata_V4.MetadataSummary metadataSummaryWithRelativePaths =
metadataTableWithRelativePaths.getSummary();
- if (directoryList.size() > 0 && childFiles.size() == 0) {
- ParquetTableMetadataDirs parquetTableMetadataDirsRelativePaths =
- new
ParquetTableMetadataDirs(metadataSummaryWithRelativePaths.directories);
- writeFile(parquetTableMetadataDirsRelativePaths, new Path(path,
METADATA_DIRECTORIES_FILENAME), fs);
- if (timer != null) {
- logger.debug("Creating metadata files recursively took {} ms",
timer.elapsed(TimeUnit.MILLISECONDS));
- }
- ParquetTableMetadataDirs parquetTableMetadataDirs = new
ParquetTableMetadataDirs(directoryList);
- return Pair.of(parquetTableMetadata, parquetTableMetadataDirs);
- }
- List<Path> emptyDirList = new ArrayList<>();
+ ParquetTableMetadataDirs parquetTableMetadataDirsRelativePaths =
Review comment:
Pls add a comment indicating that and empty directories list will be created
for leaf level directories. For sub-directories with mix of files and
directories, the directories will be tracked.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services