Apache Drill
  1. Apache Drill
  2. DRILL-685

Use proper trait in Drill Logical rule. Propagate trait from child to parent whenever possible.

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.4.0
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Activity

        Jinfeng Ni created issue -
        Jinfeng Ni made changes -
        Field Original Value New Value
        Assignee Jinfeng Ni [ jni ]
        Jinfeng Ni made changes -
        Attachment DRILL-685.1.patch [ 12644308 ]
        Jacques Nadeau made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Jacques Nadeau made changes -
        Fix Version/s 0.4.0 [ 12324963 ]
        Tony Stevenson made changes -
        Workflow no-reopen-closed, patch-avail, testing [ 12861552 ] Drill workflow [ 12933462 ]

          People

          • Assignee:
            Jinfeng Ni
            Reporter:
            Jinfeng Ni
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development