Details
-
Improvement
-
Status: Resolved
-
Low
-
Resolution: Duplicate
-
None
-
None
Description
Literals are currently not acceptable selectors in SELECT statements:
<selector> ::= <identifier> | WRITETIME '(' <identifier> ')' | TTL '(' <identifier> ')' | <function> '(' (<selector> (',' <selector>)*)? ')'
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.
Attachments
Issue Links
- duplicates
-
CASSANDRA-10783 Allow literal value as parameter of UDF & UDA
- Resolved
- is depended upon by
-
CASSANDRA-9253 Bind markers should be allowed in function arguments of Selectors
- Resolved