[ 
https://issues.apache.org/jira/browse/DRILL-3476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Chun Chang closed DRILL-3476.
-----------------------------

verified fix.

0: jdbc:drill:schema=dfs.drillTestDirDropTabl> select commit_id from 
sys.version;
+-------------------------------------------+
|                 commit_id                 |
+-------------------------------------------+
| 0686bc23e8fbbd14fd3bf852893449ef8552439d  |
+-------------------------------------------+
1 row selected (0.239 seconds)
0: jdbc:drill:schema=dfs.drillTestDirDropTabl> select * from `t.json`;
+----------------+
|       a        |
+----------------+
| {"b":1,"c":1}  |
+----------------+
1 row selected (0.256 seconds)
0: jdbc:drill:schema=dfs.drillTestDirDropTabl> select a from `t.json` t where 
t.a.b = 1;
+----------------+
|       a        |
+----------------+
| {"b":1,"c":1}  |
+----------------+
1 row selected (0.363 seconds)

> Filter on nested element gives wrong results
> --------------------------------------------
>
>                 Key: DRILL-3476
>                 URL: https://issues.apache.org/jira/browse/DRILL-3476
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Steven Phillips
>            Assignee: Chun Chang
>            Priority: Critical
>             Fix For: 1.2.0
>
>
> Take this query for example:
> {code}
> 0: jdbc:drill:drillbit=localhost> select * from t;
> +----------------+
> |       a        |
> +----------------+
> | {"b":1,"c":1}  |
> +----------------+
> {code}
> if I instead run:
> {code}
> 0: jdbc:drill:drillbit=localhost> select a from t where t.a.b = 1;
> +----------------+
> |       a        |
> +----------------+
> | {"b":1}  |
> +----------------+
> {code}
> Only a.b was returned, but the select specified a. In this case, it should 
> have returned all of the elements of a, not just the one specified in the 
> filter.
> This is because the logic in FieldSelection does not correctly handle the 
> case where a selected column is a child of another selected column. In such a 
> case, the record reader should ignore the child column, and just return the 
> full selected parent column.



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

Reply via email to