vvysotskyi commented on a change in 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:
[email protected]


With regards,
Apache Git Services

Reply via email to