[ 
https://issues.apache.org/jira/browse/DRILL-7089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16812298#comment-16812298
 ] 

ASF GitHub Bot commented on DRILL-7089:
---------------------------------------

vvysotskyi commented on pull request #1728: DRILL-7089: Implement caching for 
TableMetadataProvider at query level and adapt statistics to use Drill 
metastore API
URL: https://github.com/apache/drill/pull/1728#discussion_r272964601
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillTable.java
 ##########
 @@ -49,9 +50,7 @@
   private final String userName;
   private GroupScan scan;
   private SessionOptionManager options;
-  // Stores the statistics(rowcount, NDV etc.) associated with the table
-  private DrillStatsTable statsTable;
-  private TupleMetadata schema;
+  private MetadataProviderManager metadataProviderManager;
 
 Review comment:
   This solution wasn't a result of following a particular Design Pattern. It 
was done in order to allow caching of `MetadataProvider` and preserve lazy 
initialization. `MetadataProviderManager` will be stored to the cache and once 
`MetadataProvider` is created, `MetadataProviderManager` will receive a link to 
it and it will be reused for constructing all further `MetadataProvider` 
instances.
   
   Yes, that's correct that "there's a 1-to-many relationship between 
Manager-->Provider and a 1-to-1 relationship between a Provider and its 
associated DrillTable".
 
----------------------------------------------------------------
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


> Implement caching of BaseMetadata classes
> -----------------------------------------
>
>                 Key: DRILL-7089
>                 URL: https://issues.apache.org/jira/browse/DRILL-7089
>             Project: Apache Drill
>          Issue Type: Sub-task
>    Affects Versions: 1.16.0
>            Reporter: Volodymyr Vysotskyi
>            Assignee: Volodymyr Vysotskyi
>            Priority: Major
>             Fix For: 1.16.0
>
>
> In the scope of DRILL-6852 were introduced new classes for metadata usage. 
> These classes may be reused in other GroupScan instances to preserve heap 
> usage for the case when metadata is large.
> The idea is to store {{BaseMetadata}} inheritors in {{DrillTable}} and pass 
> them to the {{GroupScan}}, so in the scope of the single query, it will be 
> possible to reuse them.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to