[ 
https://issues.apache.org/jira/browse/DRILL-874?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Krystal updated DRILL-874:
--------------------------

    Attachment: time_dim.parquet

time_dim parquet data file

> Select that include cast of binary char column fails with 
> IndexOutOfBoundsException
> -----------------------------------------------------------------------------------
>
>                 Key: DRILL-874
>                 URL: https://issues.apache.org/jira/browse/DRILL-874
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Operators
>            Reporter: Krystal
>            Assignee: Jinfeng Ni
>         Attachments: time_dim.dat, time_dim.parquet
>
>
> git.commit.id.abbrev=e1e5ea0
> git.build.time=29.05.2014 @ 17\:11\:32 PDT
> Ran a query against a tpcds table that included an int column, and a 
> character column.  If there is no casting on the varchar column, the query 
> runs successfully.  Also, if the the query only included the cast varchar 
> column, then it runs successfully.  The error occurs when selecting some 
> other columns plus casting of varchar columns.  For example:
> 0: jdbc:drill:schema=dfs.tpcds> select t_time_sk, cast(t_time_id as 
> varchar(16)) from time_dim limit 5;
> +------------+------------+
> | t_time_sk  |   EXPR$1   |
> +------------+------------+
> | 0          | AAAAAAAABAAAAAAA |
> | 1          | AAAAAAAACAAAAAAA |
> | 2          | AAAAAAAADAAAAAAA |
> | 3          | AAAAAAAAEAAAAAAA |
> | 4          | AAAAAAAAFAAAAAAA |
> error_type: 0
> message: "Failure while running fragment. < IndexOutOfBoundsException:[ 
> index: 4096 (expected: range(0, 4096)) ]"
> ]
> java.lang.RuntimeException: java.sql.SQLException: Failure while trying to 
> get next result batch.
>       at sqlline.SqlLine$IncrementalRows.hasNext(SqlLine.java:2514)
>       at sqlline.SqlLine$TableOutputFormat.print(SqlLine.java:2148)
>       at sqlline.SqlLine.print(SqlLine.java:1809)
>       at sqlline.SqlLine$Commands.execute(SqlLine.java:3766)
>       at sqlline.SqlLine$Commands.sql(SqlLine.java:3663)
>       at sqlline.SqlLine.dispatch(SqlLine.java:889)
>       at sqlline.SqlLine.begin(SqlLine.java:763)
>       at sqlline.SqlLine.start(SqlLine.java:498)
>       at sqlline.SqlLine.main(SqlLine.java:460)



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

Reply via email to