[
https://issues.apache.org/jira/browse/DRILL-2562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14395792#comment-14395792
]
Steven Phillips commented on DRILL-2562:
----------------------------------------
In your original order by query, key and trim(key) are different columns,
essentially. You are selecting trim(key), which is what is displayed, but
ordering by key.
> Order by over trimmed key, results in incorrect ordering
> --------------------------------------------------------
>
> Key: DRILL-2562
> URL: https://issues.apache.org/jira/browse/DRILL-2562
> Project: Apache Drill
> Issue Type: Bug
> Components: Query Planning & Optimization
> Affects Versions: 0.8.0
> Environment: | f658a3c513ddf7f2d1b0ad7aa1f3f65049a594fe | DRILL-2209
> Insert ProjectOperator with MuxExchange | 09.03.2015 @ 01:49:18 EDT
> Reporter: Khurram Faraaz
> Assignee: Steven Phillips
> Priority: Critical
> Attachments: longStringInJsnData.json
>
>
> Input data in JSON data file has prevailing and trailing spaces for some of
> the values. Trimming the whitespace and then doing an order by over the
> trimmed results, we see the query returned results in in correct ordering.
> Each value is a string value. Some of the strings are very long in length
> (they have 1000-2049 characters in them).
> {code}
> 0: jdbc:drill:> select trim(key) from `longStringInJsnData.json` order by key;
> +------------+
> | EXPR$0 |
> +------------+
> | p |
> | m |
> | a |
> | aeiou |
> | h |
> | z |
> | Hello World! |
> ...
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)