Details
-
New Feature
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
Description
Intention: Allow operators in CQL
Operators could be decimal arithmetics + - * / or boolen arithmetics | & ! or string 'arithmetics' +
SELECT tab.label + ' = ' + tab.value FROM foo.tab
SELECT * FROM tab WHERE tab.label + ' = ' + tab.value = 'foo = bar'
as well as
CREATE INDEX idx ON tab ( tab.tabel + '=' + tab.value )
or
CREATE INDEX idx ON tab (label) WHERE contains(tab.tabel, 'very-important-key')
Operators could be mapped to UDFs like this:
+ mapped to UDF cstarstd::oper_plus(...)
- mapped to UDF cstarstd::oper_minus(...)
or handled directly via Cql.g in 'special' code
Attachments
Issue Links
- is duplicated by
-
CASSANDRA-5505 Please add support for basic arithmetic operations in CQL
- Resolved
- is related to
-
CASSANDRA-7458 functional indexes
- Open
-
CASSANDRA-7391 Partial indexes
- Open
1.
|
Add support for arithmetic operators | Resolved | Unassigned | |
2.
|
Add support for + and - operations on dates | Resolved | Benjamin Lerer |