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

Aman Sinha commented on DRILL-940:
----------------------------------

Tested the queries in this bug against my patch for DRILL-727 which has a 
similar issue and the queries ran successfully... see example output below.  We 
could mark this bug as duplicate of 727 but make sure the tests are added to 
the regression suite.  

0: jdbc:drill:zk=local> select a from data order by a, b;
+------------+
|     a      |
+------------+
| 3643       |
| 4601       |
| 13204      |
| 15341      |
| 15547      |
| 21926      |
| 22752      |
| 25432      |
| 26270      |
| 30834      |
+------------+
10 rows selected (1.067 seconds)

> Failure when trying to sort on column that is not selected
> ----------------------------------------------------------
>
>                 Key: DRILL-940
>                 URL: https://issues.apache.org/jira/browse/DRILL-940
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: SQL Parser
>            Reporter: Steven Phillips
>            Assignee: Aman Sinha
>            Priority: Blocker
>             Fix For: 1.0.0-BETA1
>
>
> When running a query where the order by clause includes a column that is not 
> in the selection, we get index out of bounds exception:
> jdbc:drill:zk=local> select a from data order by a, b;
> Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while 
> running query.[error_id: "49cb54dd-00cf-4f44-8f01-979471f32cf7"
> endpoint {
>   address: "localhost"
>   user_port: 31010
>   control_port: 31011
>   data_port: 31012
> }
> error_type: 0
> message: "Failure while setting up Foreman. < AssertionError:[ Internal 
> error: Error while applying rule ExpandConversionRule, args 
> [rel#2061:AbstractConverter.LOGICAL.ANY([]).[0, 
> 1](child=rel#2053:Subset#3.LOGICAL.ANY([]).[],convention=LOGICAL,DrillDistributionTraitDef=ANY([]),sort=[0,
>  1])] ] < IndexOutOfBoundsException:[ index (1) must be less than size (1) ]"
> ]



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to