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 2015/02/09 04:39:34 UTC

[jira] [Created] (DRILL-2183) Flatten behavior not consistent with rest of drill when we use it on a non-existent field

Rahul Challapalli created DRILL-2183:
----------------------------------------

             Summary: Flatten behavior not consistent with rest of drill when we use it on a non-existent field
                 Key: DRILL-2183
                 URL: https://issues.apache.org/jira/browse/DRILL-2183
             Project: Apache Drill
          Issue Type: Bug
          Components: Functions - Drill
            Reporter: Rahul Challapalli
            Assignee: Daniel Barclay (Drill/MapR)


git.commit.id.abbrev=c54bd6a

Projecting a non-existent column
{code}
0: jdbc:drill:schema=dfs_eea> select field_not_present from `data1.json`;
+-------------------+
| field_not_present |
+-------------------+
| null              |
| null              |
+-------------------+
{code}

Using a non existent column in a function :
{code}
0: jdbc:drill:schema=dfs_eea> select MAX(field_not_present) from `data1.json`;
+------------+
|   EXPR$0   |
+------------+
| null       |
+------------+
1 row selected (0.07 seconds)
{code}

Using a non-existent column in a filter
{code}
0: jdbc:drill:schema=dfs_eea> select MAX(uid) from `data1.json` where field_not_present > 1;
+------------+
|   EXPR$0   |
+------------+
+------------+
{code}

However when we use flatten things work differently

{code}
0: jdbc:drill:schema=dfs_eea> select uid , flatten(field_not_present) from `data1.json`;
Query failed: RemoteRpcException: Failure while running fragment., org.apache.drill.exec.vector.NullableIntVector cannot be cast to org.apache.drill.exec.vector.RepeatedVector [ afe463ac-2523-43b2-882f-814ae4a116e1 on qa-node191.qa.lab:31010 ]
[ afe463ac-2523-43b2-882f-814ae4a116e1 on qa-node191.qa.lab:31010 ]


Error: exception while executing query: Failure while executing query. (state=,code=0)
{code}

Even if we do not make it consistent, we should at-least make the error message more clear




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)