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 0E14C200B4C for ; Fri, 22 Jul 2016 20:13:28 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0CB0E160A6D; Fri, 22 Jul 2016 18:13:28 +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 79012160A5A for ; Fri, 22 Jul 2016 20:13:27 +0200 (CEST) Received: (qmail 25730 invoked by uid 500); 22 Jul 2016 18:13:21 -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 25717 invoked by uid 99); 22 Jul 2016 18:13:21 -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; Fri, 22 Jul 2016 18:13:21 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 28FE0E058E; Fri, 22 Jul 2016 18:13:21 +0000 (UTC) From: vdiravka To: dev@drill.apache.org Reply-To: dev@drill.apache.org References: In-Reply-To: Subject: [GitHub] drill pull request #549: DRILL-4682: Allow full schema identifier in SELECT ... Content-Type: text/plain Message-Id: <20160722181321.28FE0E058E@git1-us-west.apache.org> Date: Fri, 22 Jul 2016 18:13:21 +0000 (UTC) archived-at: Fri, 22 Jul 2016 18:13:28 -0000 Github user vdiravka commented on a diff in the pull request: https://github.com/apache/drill/pull/549#discussion_r71921608 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/sql/parser/DrillCompoundIdentifier.java --- @@ -69,31 +70,38 @@ public void addIndex(int index, SqlParserPos pos){ } } - public SqlNode getAsSqlNode(){ - if(ids.size() == 1){ + public SqlNode getAsSqlNode(Set fullSchemasSet) { --- End diff -- Do you ask about clarification/github comment or code comment? Calcite parses the query with schema name in column name correctly. Then Drill reconverts SqlNode for supporting complex types [DRILL-932](https://issues.apache.org/jira/browse/DRILL-932). But it was hardcoded: handled everything post two index as item operator (For column name in select clause `cp.employee.json.employee_id` SqlNode was `cp.employee.json['department_id']` instead of `cp.employee.json.department_id`). I added the case when full schema identifier is used in select clause to handle everything post two index (except schema identifier) as item operator. I made it by comparing column names identifiers with full schema identifiers from `from` and `join` clauses --- 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. ---