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

Sylvain Lebresne resolved CASSANDRA-9243.
-----------------------------------------
    Resolution: Duplicate

> Literals should be valid selectors in SELECT statements
> -------------------------------------------------------
>
>                 Key: CASSANDRA-9243
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-9243
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Michaël Figuière
>            Priority: Minor
>             Fix For: 3.x
>
>
> Literals are currently not acceptable selectors in {{SELECT}} statements:
> {noformat}
> <selector> ::= <identifier>
>              | WRITETIME '(' <identifier> ')'
>              | TTL '(' <identifier> ')'
>              | <function> '(' (<selector> (',' <selector>)*)? ')'
> {noformat}
> This wasn't a big deal up to now as it wasn't very useful for users, but with 
> UDFs being added in Cassandra 3.0, this means that literals aren't valid 
> parameters of function. I believe it would actually be useful for several use 
> cases:
> * To allow developers to test their own functions without having to set a 
> value to a column to then pass it as an argument to the function.
> * To make it possible to write function that require a constant parameter 
> such as {{pow(int, int) -> int}} or {{contains(set<text>, text) -> boolean}}.
> Additionally, this limitation is an inconsistency as literals are allowed in 
> functions when used in {{INSERT}} statements.



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

Reply via email to