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 C4F85200B33 for ; Wed, 29 Jun 2016 17:33:40 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C3755160A57; Wed, 29 Jun 2016 15:33:40 +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 17FCA160A3C for ; Wed, 29 Jun 2016 17:33:39 +0200 (CEST) Received: (qmail 38290 invoked by uid 500); 29 Jun 2016 15:33: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 Delivered-To: moderator for dev@drill.apache.org Received: (qmail 21709 invoked by uid 99); 29 Jun 2016 14:16:49 -0000 X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.999 X-Spam-Level: ** X-Spam-Status: No, score=2.999 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001] autolearn=disabled Date: Wed, 29 Jun 2016 16:16:37 +0200 From: Till Haug To: Message-ID: <1559c84cdd3.dd66c1d550726.4058759938604893816@veezoo.com> Subject: Critical Bug with Column Name Clash MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_116864_1669730466.1467209797081" X-Priority: Medium User-Agent: Zoho Mail X-Mailer: Zoho Mail archived-at: Wed, 29 Jun 2016 15:33:41 -0000 ------=_Part_116864_1669730466.1467209797081 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi guys My company encountered a critical bug in Apache Drill 1.7.0 (and earlier ve= rsions) and we=E2=80=99re not sure if this is an already known problem. If there are two columns with the same name in two different tables, there = seems to be a conflict. Example 1: select t.emp_no as col_one, d.emp_no as col_two from mysqlaws.employees.titles as t, mysqlaws.employees.dept_manager as d where t.emp_no =3D d.emp_no Result 1: emp_no emp_no0 110022 null 110022 null 110039 null =E2=80=A6 Expected Result 1: emp_no emp_no0 110022 110022 110022 110022 110039 110039 =E2=80=A6 Example 2: select t.from_date as col_one, d.from_date as col_two from mysqlaws.employees.titles as t, mysqlaws.employees.dept_manager as d where t.emp_no =3D d.emp_no Result 2: col_one col_two 1985-01-01 null 1985-01-01 null 1991-10-01 null =E2=80=A6 Expected Result 2: col_one col_two 1985-01-01 1985-01-01 1991-10-01 1985-01-01 1991-10-01 1991-10-01 =E2=80=A6 In Example 1 there is no rename happening and the col_two is all nulls. In Example 2 the rename is happening, but the col_two is still all nulls. When we run these queries directly against the databases (both mssql and my= sql) they work as expected. If you=E2=80=99d like to directly reproduce it, feel free to use our server= we set up with the following storage plugin { "type": "jdbc", "driver": "com.mysql.jdbc.Driver", "url": "jdbc:mysql://vz-test.cbnbj0e1vrwg.eu-central-1.rds.amazonaws.com:8= 008", "username": "vz_master", "password": "vzpassword", "enabled": false } Thank you and All the Best Till ------=_Part_116864_1669730466.1467209797081--