Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-17190

Add support for String contatenation through the "+" operator

    XMLWordPrintableJSON

Details

    Description

      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).

      Attachments

        Issue Links

          Activity

            People

              manish.c.ghildiyal@gmail.com Manish Ghildiyal
              blerer Benjamin Lerer
              Manish Ghildiyal
              Benjamin Lerer, Berenguer Blasi, Brandon Williams
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 4h
                  4h