You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Berenguer Blasi (Jira)" <ji...@apache.org> on 2022/02/04 08:13:00 UTC

[jira] [Commented] (CASSANDRA-17190) Add support for String contatenation through the "+" operator

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

Berenguer Blasi commented on CASSANDRA-17190:
---------------------------------------------

Hi, I dropped a couple comments and started a new CI run with the new dtest repro [here|https://ci-cassandra.apache.org/job/Cassandra-devbranch/1399/]. Let's see how it goes :-)

> Add support for String contatenation through the "+" operator
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-17190
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17190
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: CQL/Interpreter
>            Reporter: Benjamin Lerer
>            Assignee: Manish Ghildiyal
>            Priority: Normal
>              Labels: AdventCalendar2021, lhf
>             Fix For: 4.x
>
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Since 4.0, Cassandra support operations on numeric types and on some temporal types.
> We should add support for string concatenations through the {{+}} operator.
> +Additional information for newcomers:+
> Cassandra has 2 string types: {{Text}} ({{UTF8Type}})  and ascii ({{AsciiType}}) both are sub-classes of ({{StringType}}). In order to add support for string concatenation you will need to add a new method to {{StringType}} and modify {{OperationFcts}} to add the new functions (one for each combination of types: ascii/ascii, ascii/text, text/ascii and text/text).
> The unit test should be added to {{OperationFctsTest}}.
> To allow for concatenating constants (eg: SELECT v1 + ' ' + v2 FROM ...) you will need to add a {{getPreferedTypeFor}} method to {{org.apache.cassandra.Constants.Type.STRING}} that determine the constant type based on its content (ascii or not).      



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org