You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Kathiresan Selvaraj (JIRA)" <ji...@apache.org> on 2016/09/28 19:19:20 UTC
[jira] [Created] (DRILL-4912) Ability to use alias in join
conditions
Kathiresan Selvaraj created DRILL-4912:
------------------------------------------
Summary: Ability to use alias in join conditions
Key: DRILL-4912
URL: https://issues.apache.org/jira/browse/DRILL-4912
Project: Apache Drill
Issue Type: Improvement
Components: Execution - Flow, SQL Parser
Affects Versions: 1.8.0, 1.6.0
Reporter: Kathiresan Selvaraj
Json files used for testing:
data.json
{ "name": "Jim","city" : [1,2]}
cities.json
{id:1,name:"Sendurai"}
{id:2,name:"NYC"}
Below query returns no result.
select city\[0\] as cityalias from dfs.tmp.`data.json` a join (select id as idalias from dfs.tmp.`cities.json`) b on a.cityalias = b.idalias
However, the query below works fine
select city\[0\] as cityalias from dfs.tmp.`data.json` a join (select id as idalias from dfs.tmp.`cities.json`) b on a.city\[0\] = b.idalias
Using an alias for city\[0\] in the join condition makes it return no result.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)