You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Rahul Challapalli (JIRA)" <ji...@apache.org> on 2014/08/12 12:23:11 UTC

[jira] [Created] (DRILL-1288) With json data drill is not returning all the columns in the query involving a join

Rahul Challapalli created DRILL-1288:
----------------------------------------

             Summary: With json data drill is not returning all the columns in the query involving a join
                 Key: DRILL-1288
                 URL: https://issues.apache.org/jira/browse/DRILL-1288
             Project: Apache Drill
          Issue Type: Bug
          Components: Storage - JSON
            Reporter: Rahul Challapalli
            Priority: Critical


git.commit.id.abbrev

In the below  case drill does not return the 3rd column
{code}
select
      s.s_suppkey,
      s.s_nationkey,
      n.n_name
    from
      supplier s,
      nation n
    where
      s.s_nationkey = n.n_nationkey limit 1;

+------------+-------------+
| s_suppkey  | s_nationkey |
+------------+-------------+
| 1          | 17          |
+------------+-------------+

{code}

In the below case drill does not return the second column
{code}
select
      n.n_name,
      s.s_suppkey
    from
      supplier s,
      nation n
    where
      s.s_nationkey = n.n_nationkey limit 1;

+------------+
|   n_name   |
+------------+
| PERU       |
+------------+
{code}

Looks like drill is only returning the columns from table/file of the first column. If the first column is from nation, drill returns all subsequent columns from nation but does not return anything from supplier.

However if use a function on columns from the second table, drill does return everything normally

{code}
select
      s.s_suppkey,
      char_length(n.n_name) as name_length
    from
      supplier s,
      nation n
    where
      s.s_nationkey = n.n_nationkey limit 1;

+------------+-------------+
| s_suppkey  | name_length |
+------------+-------------+
| 1          | 4           |
+------------+-------------+
{code}

This issue is affecting TPCH queries 10, 7, 3 on top of JSON data.
Data used is provided as an attachement



--
This message was sent by Atlassian JIRA
(v6.2#6252)