vvysotskyi 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_r392706872
########## File path: exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/easy/EasyGroupScan.java ########## @@ -90,17 +95,14 @@ public EasyGroupScan( @JsonProperty("selectionRoot") Path selectionRoot, @JsonProperty("schema") TupleMetadata schema ) throws IOException { - super(ImpersonationUtil.resolveUserName(userName)); + super(ImpersonationUtil.resolveUserName(userName), columns, ValueExpressions.BooleanExpression.TRUE); this.selection = FileSelection.create(null, files, selectionRoot); this.formatPlugin = engineRegistry.resolveFormat(storageConfig, formatConfig, EasyFormatPlugin.class); this.columns = columns == null ? ALL_COLUMNS : columns; this.selectionRoot = selectionRoot; - SimpleFileTableMetadataProviderBuilder builder = - (SimpleFileTableMetadataProviderBuilder) - new FileSystemMetadataProviderManager() - .builder(MetadataProviderManager.MetadataProviderKind.SCHEMA_STATS_ONLY); - this.metadataProvider = builder.withLocation(selection.getSelectionRoot()) + this.metadataProvider = defaultTableMetadataProviderBuilder(new FileSystemMetadataProviderManager()) Review comment: Caching here is done in the scope of the query - since it may be excessive to store metadata between queries submitting, sine even if several queries use the same tables, there is no guarantee that the same drillbit will be foreman for all these queries. Also, there may be a problem with cache actuality. ---------------------------------------------------------------- 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