You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Benjamin Lerer (JIRA)" <ji...@apache.org> on 2016/06/01 14:38:59 UTC

[jira] [Comment Edited] (CASSANDRA-7461) operator functionality in CQL

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

Benjamin Lerer edited comment on CASSANDRA-7461 at 6/1/16 2:38 PM:
-------------------------------------------------------------------

There are 3 categories of operators:
* Arithmetic operators: {{+}}, {{-}}, {{*}}, {{/}} and {{%}}
* Logical operators: {{|}}, {{&}}, {{!}} and {{XOR}}
* String concatenation: {{+}}

I think it is probably best to use this ticket as an umbrella ticket and to split the ticket into sub tasks.  


was (Author: blerer):
There are 3 categories of operators:
* Arithmetic operators: {{+}}, {{-}}, {{*}}, {{/}} and {{%}}
* Logical operators: {{|}}, {{&}}, {{!}} and {{XOR}}
* String concatenation: {{+}}

I think it is probably best to use this ticket as an umbrella ticket and to split the ticket into 3 sub task.  

> operator functionality in CQL
> -----------------------------
>
>                 Key: CASSANDRA-7461
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7461
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: CQL
>            Reporter: Robert Stupp
>            Assignee: Benjamin Lerer
>              Labels: cql
>
> 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



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