From dev-return-46919-apmail-drill-dev-archive=drill.apache.org@drill.apache.org Sun Apr 7 19:06:19 2019 Return-Path: X-Original-To: apmail-drill-dev-archive@www.apache.org Delivered-To: apmail-drill-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id 1EAB318FCD for ; Sun, 7 Apr 2019 19:06:19 +0000 (UTC) Received: (qmail 57724 invoked by uid 500); 7 Apr 2019 18:46:39 -0000 Delivered-To: apmail-drill-dev-archive@drill.apache.org Received: (qmail 57420 invoked by uid 500); 7 Apr 2019 18:46:39 -0000 Mailing-List: contact dev-help@drill.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@drill.apache.org Delivered-To: mailing list dev@drill.apache.org Received: (qmail 57382 invoked by uid 99); 7 Apr 2019 18:46:39 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Apr 2019 18:46:39 +0000 From: GitBox To: dev@drill.apache.org Subject: [GitHub] [drill] amansinha100 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 Message-ID: <155466397642.3730.3514541153586866074.gitbox@gitbox.apache.org> Date: Sun, 07 Apr 2019 19:06:16 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit amansinha100 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_r272846760 ########## 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: The fact that the DrillTable has a reference to the `MetadataProviderManager` rather than the `MetadataProvider` itself is significant..I suppose you are following a particular Design Pattern .. probably the Facade Pattern [1] ? The MetadataProvider also follows the Builder pattern, so there's 2 levels of indirection: Manager --> Provider --> Builder. My initial thought was that 'do we need both or could a Provider be able to create instances for multiple tables, so a Provider --> Builder be sufficient ? Your approach is that there's a 1-to-many relationship between Manager-->Provider and a 1-to-1 relationship between a Provider and its associated DrillTable. Is that correct ? [1] https://en.wikipedia.org/wiki/Facade_pattern ---------------------------------------------------------------- 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: users@infra.apache.org With regards, Apache Git Services