vvysotskyi 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_r296762428
##########
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:
Yes, it is expected. Later it may be replaced with a regular list or if
filtering will not happen, there wouldn't be allocated new object.
----------------------------------------------------------------
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