[
https://issues.apache.org/jira/browse/DRILL-5845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16276611#comment-16276611
]
Vitalii Diravka commented on DRILL-5845:
----------------------------------------
[~rhou] Dir0/dir1/dir2 should appear as the first few columns:
https://drill.apache.org/docs/querying-directories/
But is other columns ordering correct? Could you provide test case? But anyway
if column ordering is wrong for querying directories it can be other issue,
since the bug will be placed in other operator.
> Columns returned by select with "ORDER BY" and "LIMIT" clauses are not in
> correct order.
> ----------------------------------------------------------------------------------------
>
> Key: DRILL-5845
> URL: https://issues.apache.org/jira/browse/DRILL-5845
> Project: Apache Drill
> Issue Type: Bug
> Components: Query Planning & Optimization
> Affects Versions: 1.11.0
> Reporter: Vitalii Diravka
> Assignee: Vitalii Diravka
> Labels: ready-to-commit
> Fix For: 1.12.0
>
>
> Column order is proper for queries with only one clause: ORDER BY or LIMIT.
> For queries with both these clauses column order isn't preserved.
> Test case for reproduce:
> {code}
> 0: jdbc:drill:zk=local> select * from cp.`tpch/nation.parquet` limit 1;
> +--------------+----------+--------------+------------------------------------------------------+
> | n_nationkey | n_name | n_regionkey | n_comment
> |
> +--------------+----------+--------------+------------------------------------------------------+
> | 0 | ALGERIA | 0 | haggle. carefully final deposits
> detect slyly agai |
> +--------------+----------+--------------+------------------------------------------------------+
> 1 row selected (0.181 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.154 seconds)
> {code}
> For json files the column ordering is not preserved as well:
> {code}
> select * from cp.`employee.json` limit 1;
> select * from cp.`employee.json` order by full_name limit 1;
> {code}
> Perhaps the wrong operator for sorting is used.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)