You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jacques Nadeau (JIRA)" <ji...@apache.org> on 2014/07/27 20:51:41 UTC

[jira] [Commented] (DRILL-1061) Add or modify Optiq rule such that two projects involving complex JSON objects should not be collapsed into one.

    [ https://issues.apache.org/jira/browse/DRILL-1061?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14075688#comment-14075688 ] 

Jacques Nadeau commented on DRILL-1061:
---------------------------------------

Fixed by caa8b78 or earlier

> Add or modify Optiq rule such that two projects involving complex JSON objects should not be collapsed into one.  
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-1061
>                 URL: https://issues.apache.org/jira/browse/DRILL-1061
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Jinfeng Ni
>            Assignee: DrillCommitter
>             Fix For: 0.4.0
>
>         Attachments: DRILL-1061.patch
>
>
> Currently, Drill could not nest a function whose output is a complex JSON object into another function directly.  For instance,
> select foo.mycol.x from (
>         select convert_from('{ x : [1,2], y : 100 }', 'JSON') as mycol 
>         from cp.`tpch/nation.parquet`) as foo(mycol);
> select convert_to(foo.mycol.x, 'JSON') from (
>         select convert_from('{ x : [1,2], y : 100 }', 'JSON') as mycol 
>         from cp.`tpch/nation.parquet`) as foo(mycol);
> Optiq will merge the project in the out subquery with the project in the inner subquery into one project expression. This cause issues in Drill side.
> In stead, we should add or modify Optiq rule so that the two projects will stay where they are, and evaluate the convert_from () first and produce a record batch. The second project will read from the record batch, and produce its output.  
> Doing that will enable Drill to use out / inner subquery to refer the complex JSON object . 



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