[
https://issues.apache.org/jira/browse/DRILL-498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13965671#comment-13965671
]
ASF GitHub Bot commented on DRILL-498:
--------------------------------------
GitHub user StevenMPhillips opened a pull request:
https://github.com/apache/incubator-drill/pull/48
DRILL-498 cast to varchar only returns one row
The problem was that the column reader was not using the set or setSafe
interface for writing to a vector, but was writing directly to the buffers. So
when DRILL-417 was fixed, this no longer worked.
The fix was to use the proper interfaces.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/StevenMPhillips/incubator-drill DRILL-498
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-drill/pull/48.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #48
----
commit 7e87d3054b73b6865aa920d06355e1afa5161630
Author: Steven Phillips <[email protected]>
Date: 2014-04-10T03:03:37Z
DRILL-498 cast to varchar only returns one row
----
> cast to varchar only returns one row
> ------------------------------------
>
> Key: DRILL-498
> URL: https://issues.apache.org/jira/browse/DRILL-498
> Project: Apache Drill
> Issue Type: Bug
> Reporter: Chun Chang
> Assignee: Steven Phillips
> Priority: Critical
>
> Tried the patch for JIRA496, now the storage engine is able to read parquet
> files, but cast only returns one row.
> 0: jdbc:drill:schema=dfs> select * from days;
> +------------+------------+
> | day | week_day |
> +------------+------------+
> | 1 | [B@2cef1cb4 |
> | 2 | [B@6458478 |
> | 5 | [B@3dfbe57f |
> | 4 | [B@649814a3 |
> | 3 | [B@3c730ced |
> | 6 | [B@2555ba9c |
> | 7 | [B@1f4e6aea |
> +------------+------------+
> 7 rows selected (1.829 seconds)
> 0: jdbc:drill:schema=dfs> select `day`, cast(week_day as varchar(20)) from
> days;
> +------------+------------+
> | day | EXPR$1 |
> +------------+------------+
> | 1 | Sunday |
> | 2 | |
> | 5 | |
> | 4 | |
> | 3 | |
> | 6 | |
> | 7 | |
> +------------+------------+
--
This message was sent by Atlassian JIRA
(v6.2#6252)