You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Jason Altekruse (JIRA)" <ji...@apache.org> on 2015/01/21 23:03:34 UTC

[jira] [Commented] (DRILL-1650) Add support for repeated_count multi-level array data type?

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

Jason Altekruse commented on DRILL-1650:
----------------------------------------

This function has not been implemented for repeated maps either, or various Drill types that cannot be created as repeated types currently. We currently have not way to example cast a list of strings to a list of dates, but once this is added we would also fail to evaluate the repeated count function on the resulting list. In short as we are fixing this we should implement the functionality for all types.

> Add support for repeated_count multi-level array data type?
> -----------------------------------------------------------
>
>                 Key: DRILL-1650
>                 URL: https://issues.apache.org/jira/browse/DRILL-1650
>             Project: Apache Drill
>          Issue Type: Improvement
>          Components: Functions - Drill
>    Affects Versions: 0.6.0
>            Reporter: Hao Zhu
>            Assignee: Mehant Baid
>             Fix For: Future
>
>
> 1. "n1.json" is :
> {code}
> {"test":[1,2,3,4,4,5]}
> {code}
> Then the function works fine:
> {code}
> 0: jdbc:drill:> select repeated_count(t.test) from `n1.json` as t;
> +------------+
> |   EXPR$0   |
> +------------+
> | 6          |
> +------------+
> {code}
> 2. However if the json has 2-level or more arrays:
> {code}
> {"test":[[1,2,3,4,5,6]]}
> {code}
> The function failed:
> {code}
> 0: jdbc:drill:> select t.test[0][0],t.test[0][1] from `n4.json` as t;
> +------------+------------+
> |   EXPR$0   |   EXPR$1   |
> +------------+------------+
> | 1          | 2          |
> +------------+------------+
> 1 row selected (0.126 seconds)
> 0: jdbc:drill:> select repeated_count(t.test[0]) from `n4.json` as t;
> Query failed: Screen received stop request sent. Line 54, Column 22: "end" is neither a method, a field, nor a member class of "org.apache.drill.exec.vector.complex.reader.FieldReader" [11c5ff5b-c00f-4754-9bda-c3bec9471f72]
> Error: exception while executing query: Failure while trying to get next result batch. (state=,code=0)
> {code}
> Am I missing something or is this a bug?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)