Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-7587

Query with VALUES clause returns the wrong result when planner.slice_target is small

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 1.16.0, 1.17.0
    • Fix Version/s: 1.18.0
    • Component/s: None
    • Labels:

      Description

      Problem description
      The query returns the wrong result when planner.slice_target is less than the rows count returned fromĀ VALUES.

      Steps to reproduce
      1. Set planner.slice_target to 1:

      set `planner.slice_target`=1;
      

      2. Run query with VALUES clause which returns more rows than 1:

      select id, name from (values(1234567890123456789, 'a'), (-1234567890123456789, 'z')) t(id, name);
      

      Expected result

      +----------------------+------+
      |          id          | name |
      +----------------------+------+
      | 1234567890123456789  | a    |
      | -1234567890123456789 | z    |
      +----------------------+------+
      

      Actual result

      +----------------------+------+
      |          id          | name |
      +----------------------+------+
      | 1234567890123456789  | a    |
      | 1234567890123456789  | a    |
      | -1234567890123456789 | z    |
      | -1234567890123456789 | z    |
      +----------------------+------+
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                arina Arina Ielchiieva
                Reporter:
                volodymyr Vova Vysotskyi
                Reviewer:
                Vova Vysotskyi
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: