Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.11.0
-
None
Description
Columns ordering doesn't preserve for the star query with sorting when this is planned into multiple fragments.
Repro steps:
1)
alter session set `planner.slice_target`=1;
2) ORDER BY clause in the query.
Scenarios:
0: jdbc:drill:zk=local> alter session reset `planner.slice_target`; +-------+--------------------------------+ | ok | summary | +-------+--------------------------------+ | true | planner.slice_target updated. | +-------+--------------------------------+ 1 row selected (0.082 seconds) 0: jdbc:drill:zk=local> select * from cp.`tpch/nation.parquet` order by n_name limit 1; +--------------+----------+--------------+------------------------------------------------------+ | n_nationkey | n_name | n_regionkey | n_comment | +--------------+----------+--------------+------------------------------------------------------+ | 0 | ALGERIA | 0 | haggle. carefully final deposits detect slyly agai | +--------------+----------+--------------+------------------------------------------------------+ 1 row selected (0.141 seconds) 0: jdbc:drill:zk=local> alter session set `planner.slice_target`=1; +-------+--------------------------------+ | ok | summary | +-------+--------------------------------+ | true | planner.slice_target updated. | +-------+--------------------------------+ 1 row selected (0.091 seconds) 0: jdbc:drill:zk=local> select * from cp.`tpch/nation.parquet` order by n_name limit 1; +------------------------------------------------------+----------+--------------+--------------+ | n_comment | n_name | n_nationkey | n_regionkey | +------------------------------------------------------+----------+--------------+--------------+ | haggle. carefully final deposits detect slyly agai | ALGERIA | 0 | 0 | +------------------------------------------------------+----------+--------------+--------------+ 1 row selected (0.201 seconds)
Attachments
Issue Links
- is related to
-
DRILL-3101 Setting "slice_target" to 1 changes the order of the columns in a "select *" query with order by
- Resolved
- relates to
-
DRILL-5845 Columns returned by select with "ORDER BY" and "LIMIT" clauses are not in correct order.
- Resolved
- links to