You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Hanifi Gunes (JIRA)" <ji...@apache.org> on 2014/08/13 20:40:12 UTC
[jira] [Created] (DRILL-1295) Select returns null for non pivot
fields with a nested select
Hanifi Gunes created DRILL-1295:
-----------------------------------
Summary: Select returns null for non pivot fields with a nested select
Key: DRILL-1295
URL: https://issues.apache.org/jira/browse/DRILL-1295
Project: Apache Drill
Issue Type: Bug
Components: Execution - Data Types
Reporter: Hanifi Gunes
Take two simple csv files:
t1.csv:
ID,Name,Lastname
9711942,name0,last0
9707867,name1,last1
t2.csv
ID,Case Number
9711942,HX362083
9707867,HX357851
The following queries return:
select columns[0], columns[1], columns[2]
FROM dfs.`/path/to/t1.csv`;
+------------+------------+------------+
| ID | Name | Lastname |
| 9711942 | name0 | last0 |
| 9707867 | name1 | last1 |
+------------+------------+------------+
SELECT columns[0] FROM dfs.`/path/to/t2.csv`;
+------------+
| ["ID","Name","Lastname"] |
| ["9711942","name0","last0"] |
| ["9707867","name1","last1"] |
+------------+
This one returns all the fields null except the pivot field
select columns[0], columns[1], columns[2]
FROM dfs.`/path/to/t1.csv`
where columns[0] in
(SELECT columns[0] FROM dfs.`/path/to/t2.csv`);
+------------+------------+------------+
| ID | null | null |
| 9711942 | null | null |
| 9707867 | null | null |
+------------+------------+------------+
--
This message was sent by Atlassian JIRA
(v6.2#6252)