drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Hsuan-Yi Chu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-2115) Disable function CARDINALITY in grammar
Date Sun, 08 Feb 2015 03:35:34 GMT

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

Sean Hsuan-Yi Chu commented on DRILL-2115:
------------------------------------------

 Fixed in commit 0d867b0

> Disable function CARDINALITY in grammar
> ---------------------------------------
>
>                 Key: DRILL-2115
>                 URL: https://issues.apache.org/jira/browse/DRILL-2115
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Query Planning & Optimization
>    Affects Versions: 0.8.0
>            Reporter: Victoria Markman
>            Assignee: Sean Hsuan-Yi Chu
>            Priority: Minor
>             Fix For: 0.9.0
>
>
> Since we don't support multiset type, we should disable CARDINALITY function as well:
> {code}
> 0: jdbc:drill:schema=dfs> select cardinality(list) from `test.json`;
> Query failed: Query stopped., Failure while trying to materialize incoming schema.  Errors:
>  
> Error in expression at index -1.  Error: Missing function implementation: [cardinality(BIGINT-REPEATED)].
 Full expression: --UNKNOWN EXPRESSION--.. [ db86cf79-6083-4ad7-afa1-fac534b942bc on atsqa4-134.qa.lab:31010
]
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> 0: jdbc:drill:schema=dfs> select cardinality(id) from `test.json`;
> Query failed: Query stopped., Failure while trying to materialize incoming schema.  Errors:
>  
> Error in expression at index -1.  Error: Missing function implementation: [cardinality(BIGINT-OPTIONAL)].
 Full expression: --UNKNOWN EXPRESSION--.. [ 1f209cb2-4d60-4c1d-b1d0-d921f8e8a913 on atsqa4-134.qa.lab:31010
]
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> 0: jdbc:drill:schema=dfs> select cardinality() from `test.json`;
> Query failed: SqlValidatorException: Invalid number of arguments to function 'CARDINALITY'.
Was expecting 1 arguments
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> 0: jdbc:drill:schema=dfs> select cardinality('aa') from `test.json`;
> Query failed: SqlValidatorException: Cannot apply 'CARDINALITY' to arguments of type
'CARDINALITY(<CHAR(2)>)'. Supported form(s): 'CARDINALITY(<MULTISET>)'
> 'CARDINALITY(<ARRAY>)'
> 'CARDINALITY(<MAP>)'
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}



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

Mime
View raw message