drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven Phillips (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-2562) Order by over trimmed key, results in incorrect ordering
Date Wed, 25 Mar 2015 18:49:53 GMT

    [ https://issues.apache.org/jira/browse/DRILL-2562?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14380490#comment-14380490
] 

Steven Phillips commented on DRILL-2562:
----------------------------------------

You are selecting trim(key), but ordering by key. I think you mean to order by trim(key).
If you do that, you get the correct order.

> 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: Execution - Relational Operators
>    Affects Versions: 0.8.0
>         Environment: 0: jdbc:drill:> select * from sys.version;
> +------------+----------------+-------------+-------------+------------+
> | commit_id  | commit_message | commit_time | build_email | build_time |
> +------------+----------------+-------------+-------------+------------+
> | f658a3c513ddf7f2d1b0ad7aa1f3f65049a594fe | DRILL-2209 Insert ProjectOperator with MuxExchange
| 09.03.2015 @ 01:49:18 EDT | Unknown     | 09.03.2015 @ 04:52:49 EDT |
> +------------+----------------+-------------+-------------+------------+
> 1 row selected (0.04 seconds)
>            Reporter: Khurram Faraaz
>            Assignee: Chris Westin
>            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)

Mime
View raw message