arina-ielchiieva commented on a change in pull request #1810: DRILL-7271: 
Refactor Metadata interfaces and classes to contain all needed information for 
the File based Metastore
URL: https://github.com/apache/drill/pull/1810#discussion_r296682028
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/base/AbstractGroupScanWithMetadata.java
 ##########
 @@ -535,31 +581,39 @@ public TableMetadata getTableMetadata() {
     return partitions;
   }
 
+  protected Map<Path, SegmentMetadata> getSegmentsMetadata() {
+    if (segments == null) {
+      segments = metadataProvider.getSegmentsMetadataMap();
+    }
+    return segments;
+  }
+
   @JsonIgnore
   public NonInterestingColumnsMetadata getNonInterestingColumnsMetadata() {
     if (nonInterestingColumnsMetadata == null) {
-      nonInterestingColumnsMetadata = 
metadataProvider.getNonInterestingColumnsMeta();
+      nonInterestingColumnsMetadata = 
metadataProvider.getNonInterestingColumnsMetadata();
     }
     return nonInterestingColumnsMetadata;
   }
 
   /**
    * This class is responsible for filtering different metadata levels.
    */
-  protected abstract static class GroupScanWithMetadataFilterer {
+  protected abstract static class GroupScanWithMetadataFilterer<B extends 
GroupScanWithMetadataFilterer<B>> {
     protected final AbstractGroupScanWithMetadata source;
 
     protected boolean matchAllMetadata = false;
 
     protected TableMetadata tableMetadata;
     protected List<PartitionMetadata> partitions = Collections.emptyList();
+    protected Map<Path, SegmentMetadata> segments = Collections.emptyMap();
 
 Review comment:
   Using Collections emptyMap or emptyList creates unmodifiable objects, is 
this expected?

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


With regards,
Apache Git Services

Reply via email to