You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Victoria Markman (JIRA)" <ji...@apache.org> on 2015/01/29 19:24:35 UTC

[jira] [Created] (DRILL-2115) Disable function CARDINALITY in grammar

Victoria Markman created DRILL-2115:
---------------------------------------

             Summary: 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: Jinfeng Ni
            Priority: Minor


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)