drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathiresan Selvaraj (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-4912) Ability to use alias in join conditions
Date Wed, 28 Sep 2016 19:19:20 GMT
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)

Mime
View raw message