[ https://issues.apache.org/jira/browse/CASSANDRA-11935?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15676762#comment-15676762 ]
Sylvain Lebresne commented on CASSANDRA-11935: ---------------------------------------------- bq. I do not think that there is a conflict with the prefered type here. There is a conflict in principle in the sense that if you have {{d = 3 + 4}} where {{d}} is a {{bigint}}, then the new rule would lead you to pick {{bigint add(bigint, bigint)}} while the prefered type suggests {{bigint add(int, int)}}. Don't get me wrong, both choice happens to be fine and the code pick a choice. It's more of a general remark that having intersecting and pretty special rules doesn't give me the feel of a clean and well understood type system, which give me slight concerns that some of those rules may prove annoying in future developments. But I suppose it's not a terribly precise comment, it doesn't seem we're going anywhere, and as I don't a concrete issue with the current patch, +1. > 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)