drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Till Haug <t...@veezoo.com>
Subject Critical Bug with Column Name Clash
Date Wed, 29 Jun 2016 14:16:37 GMT

Hi guys


My company encountered a critical bug in Apache Drill 1.7.0 (and earlier versions) and we’re
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 = d.emp_no


Result 1:
emp_no emp_no0
110022 null
110022 null
110039 null
…


Expected Result 1:
emp_no emp_no0
110022 110022
110022 110022
110039 110039
…


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 = d.emp_no




Result 2:
col_one col_two
1985-01-01 null
1985-01-01 null
1991-10-01 null
…


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
…




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 mysql) they work
as expected.


If you’d 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:8008",
 "username": "vz_master",
 "password": "vzpassword",
 "enabled": false
}


Thank you and All the Best
Till










Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message