Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 7DFB6200C51 for ; Sun, 26 Mar 2017 07:46:30 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 7C7B8160B96; Sun, 26 Mar 2017 05:46:30 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E99C7160B9B for ; Sun, 26 Mar 2017 07:46:29 +0200 (CEST) Received: (qmail 80904 invoked by uid 500); 26 Mar 2017 05:46:26 -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 79174 invoked by uid 99); 26 Mar 2017 05:46:24 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Mar 2017 05:46:24 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 1DD05E117B; Sun, 26 Mar 2017 05:46:24 +0000 (UTC) From: paul-rogers To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #795: DRILL-5089: Get only partial schemas of relevant st... Content-Type: text/plain Message-Id: <20170326054624.1DD05E117B@git1-us-west.apache.org> Date: Sun, 26 Mar 2017 05:46:24 +0000 (UTC) archived-at: Sun, 26 Mar 2017 05:46:30 -0000 Github user paul-rogers commented on a diff in the pull request: https://github.com/apache/drill/pull/795#discussion_r108050436 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/ops/QueryContext.java --- @@ -144,6 +145,25 @@ public SchemaPlus getNewDefaultSchema() { return defaultSchema; } + public SchemaPlus getPartialDefaultSchema() { + + final String sessionSchemaPath = session.getDefaultSchemaPath(); + final List schemaPathAsList = Lists.newArrayList(sessionSchemaPath.split("\\.")); + + final SchemaPlus rootSchema = schemaTreeProvider.createPartialRootSchema(getQueryUserName(), + this, schemaPathAsList.get(0)); + + final SchemaPlus defaultSchema = session.getDefaultSchema(rootSchema); + + if (defaultSchema == null) { + return rootSchema; + } + return defaultSchema; + } + + public void addNewRelevantSchema(Set storages, SchemaPlus toExpandSchema) { --- End diff -- `addNewSchema`? Presumably the schema is relevant of we'd not be adding it... If we are adding the schema, it is new to this context, so maybe just `addSchema`. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---