Uploaded image for project: 'Tajo'
  1. Tajo
  2. TAJO-418

sort operator after Inline views consisting of unions can cause an incorrect distributed plan

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.8.0
    • Component/s: distributed query plan
    • Labels:
      None

      Description

      See the title. The following query is an example of this bug.

      SELECT
        l_returnflag,
        l_linestatus
      
      FROM (
        SELECT
          *
        FROM
          lineitem
        WHERE
          l_returnflag = 'O'
      
        UNION ALL
      
        SELECT
          *
        FROM
          lineitem
        WHERE
          l_returnflag = 'R'
      ) T
      
      GROUP BY
        l_returnflag,
        l_linestatus
      
      ORDER BY
        l_returnflag,
        l_linestatus
      

      This patch adds an unit test to reproduce this case and includes the bug fix.

        Attachments

          Activity

            People

            • Assignee:
              hyunsik Hyunsik Choi
              Reporter:
              hyunsik Hyunsik Choi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: