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

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.16.0, 1.17.0
    • 1.18.0
    • None

    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

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

              Dates

                Created:
                Updated:
                Resolved: