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

Setting "slice_target" to 1 changes the order of the columns in a "select *" query with order by

    XMLWordPrintableJSON

Details

    Description

      git.commit.id.abbrev=d8b1975

      With Default Settings :

      select * from region order by length(r_name);
      +-------------+--------+-----------+
      | r_regionkey | r_name | r_comment |
      +-------------+--------+-----------+
      | 2 | ASIA | ges. thinly even pinto beans ca |
      | 0 | AFRICA | lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to  |
      | 3 | EUROPE | ly final courts cajole furiously final excuse |
      | 1 | AMERICA | hs use ironic, even requests. s |
      | 4 | MIDDLE EAST | uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl |
      

      Now after setting the slice target to 1, the order of the columns changed

      0: jdbc:drill:schema=dfs_eea> alter session set `planner.slice_target` = 1;
      +-------+--------------------------------+
      |  ok   |            summary             |
      +-------+--------------------------------+
      | true  | planner.slice_target updated.  |
      +-------+--------------------------------+
      1 row selected (0.11 seconds)
      0: jdbc:drill:schema=dfs_eea> select * from region order by length(r_name);
      +-----------+--------+-------------+
      | r_comment | r_name | r_regionkey |
      +-----------+--------+-------------+
      | ges. thinly even pinto beans ca | ASIA | 2 |
      | lar deposits. blithely final packages cajole. regular waters are final requests. regular accounts are according to  | AFRICA | 0 |
      | ly final courts cajole furiously final excuse | EUROPE | 3 |
      | hs use ironic, even requests. s | AMERICA | 1 |
      | uickly special accounts cajole carefully blithely close requests. carefully final asymptotes haggle furiousl | MIDDLE EAST | 4 |
      +-----------+--------+-------------+
      5 rows selected (0.796 seconds)
      

      This does not happen when we do not use an "order by" in query

      Attachments

        Issue Links

          Activity

            People

              cwestin Chris Westin
              rkins Rahul Kumar Challapalli
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: