[
https://issues.apache.org/jira/browse/CASSANDRA-11935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15689358#comment-15689358
]
Eduard Tudenhoefner commented on CASSANDRA-11935:
-------------------------------------------------
I believe this broke some [cqlsh
tests|http://cassci.datastax.com/job/cassandra-3.X_cqlsh_tests/14/]. [~blerer]
can you take a look at it please?
{code}
======================================================================
FAIL: test_parse_select (cqlshlib.test.test_cql_parsing.TestCqlParsing)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/Users/nastra/Development/workspace/cassandra/pylib/cqlshlib/test/test_cql_parsing.py",
line 167, in test_parse_select
('FILTERING', 'identifier')])
AssertionError: Sequences differ: (('SELECT', 'reserved_identifi... !=
[('SELECT', 'reserved_identifi...
First differing element 9:
('<', 'op')
('<', 'cmp')
- (('SELECT', 'reserved_identifier'),
? ^
+ [('SELECT', 'reserved_identifier'),
? ^
('FROM', 'reserved_identifier'),
('tab', 'identifier'),
('WHERE', 'reserved_identifier'),
('clustering_column', 'identifier'),
('>', 'cmp'),
('200', 'wholenumber'),
('AND', 'reserved_identifier'),
('clustering_column', 'identifier'),
- ('<', 'op'),
? ^
+ ('<', 'cmp'),
? ^^
('400', 'wholenumber'),
('ALLOW', 'reserved_identifier'),
- ('FILTERING', 'identifier'))
? ^
+ ('FILTERING', 'identifier')]
? ^
{code}
> Add support for arithmetic operators
> ------------------------------------
>
> Key: CASSANDRA-11935
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11935
> Project: Cassandra
> Issue Type: Sub-task
> Components: CQL
> Reporter: Benjamin Lerer
> Assignee: Benjamin Lerer
> Fix For: 3.x
>
>
> The goal of this ticket is to add support for arithmetic operators:
> * {{-}}: Change the sign of the argument
> * {{+}}: Addition operator
> * {{-}}: Minus operator
> * {{*}}: Multiplication operator
> * {{/}}: Division operator
> * {{%}}: Modulo operator
> This ticket we should focus on adding operator only for numeric types to keep
> the scope as small as possible. Dates and string operations will be adressed
> in follow up tickets.
> The operation precedence should be:
> # {{*}}, {{/}}, {{%}}
> # {{+}}, {{-}}
> Some implicit data conversion should be performed when operations are
> performed on different types (e.g. double + int).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)