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

Jinfeng Ni updated DRILL-685:
-----------------------------

    Attachment: DRILL-685.1.patch

The patch is basing on DRILL-684. 

> Use proper trait in Drill Logical rule. Propagate trait from child to parent 
> whenever possible. 
> ------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-685
>                 URL: https://issues.apache.org/jira/browse/DRILL-685
>             Project: Apache Drill
>          Issue Type: Improvement
>            Reporter: Jinfeng Ni
>            Assignee: Jinfeng Ni
>         Attachments: DRILL-685.1.patch
>
>
> There are two issues in several Drill Logical Rule.
> 1.  When we call convert() to convert the child node from 'None' to 
> 'Logical', we pass in the parent's trait.  This may not be right.
> For instance,
> Filter
>   \
>  Sort
> In DrillFilterRule, we will pass filter's trait when convert sort. Since 
> filter originally has empty RelCollation, this convert will produce a trivial 
> sort, thus may get a logical plan with incorrect order. 
> 2.  The logical rule does not propagate the trait from child to parent, 
> whenever possible. For instance, for the prior example,  because filter's 
> child is sort, after sort is converted into logical, the filter also has the 
> same RelCollation as its child. We should propagate such RelCollation to 
> Filter.



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

Reply via email to