drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [drill] paul-rogers commented on a change in pull request #2026: DRILL-7330: Implement metadata usage for all format plugins
Date Sat, 14 Mar 2020 19:37:15 GMT
paul-rogers commented on a change in pull request #2026: DRILL-7330: Implement metadata usage
for all format plugins
URL: https://github.com/apache/drill/pull/2026#discussion_r392613191
 
 

 ##########
 File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetGroupScan.java
 ##########
 @@ -142,25 +141,25 @@ public ParquetGroupScan(String userName,
       metadataProviderManager = new FileSystemMetadataProviderManager();
     }
 
-    ParquetFileTableMetadataProviderBuilder builder =
-        (ParquetFileTableMetadataProviderBuilder) metadataProviderManager.builder(MetadataProviderManager.MetadataProviderKind.PARQUET_TABLE);
+    ParquetTableMetadataProviderBuilder<?> builder =
+        tableMetadataProviderBuilder(metadataProviderManager);
 
-    this.metadataProvider = builder
+    ParquetTableMetadataProvider metadataProvider = builder
         .withSelection(selection)
         .withReaderConfig(readerConfig)
         .withFileSystem(fs)
         .withCorrectCorruptedDates(formatConfig.areCorruptDatesAutoCorrected())
         .build();
 
-    ParquetTableMetadataProvider parquetTableMetadataProvider = (ParquetTableMetadataProvider)
this.metadataProvider;
-    this.usedMetadataCache = parquetTableMetadataProvider.isUsedMetadataCache();
-    this.usedMetastore = parquetTableMetadataProvider instanceof MetastoreParquetTableMetadataProvider;
-    this.selectionRoot = parquetTableMetadataProvider.getSelectionRoot();
-    this.entries = parquetTableMetadataProvider.getEntries();
-    this.fileSet = parquetTableMetadataProvider.getFileSet();
+    this.usedMetadataCache = metadataProvider.isUsedMetadataCache();
+    this.usedMetastore = metadataProviderManager.usesMetastore();
+    this.selectionRoot = metadataProvider.getSelectionRoot();
+    this.entries = metadataProvider.getEntries();
+    this.fileSet = metadataProvider.getFileSet();
+    this.metadataProvider = metadataProvider;
 
 Review comment:
   These are the same six attributes mentioned for the generic Easy group scan. Rather than
duplicating them, can we encapsulate them in a single `MetadataResult` class? (You pick the
name.)

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message