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

cqlsh: interpret CQL type for formatting blob types

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 3.6
    • Legacy/Tools
    • None

    Description

      During the development of CASSANDRA-11053 we have added changes to the cqlsh formatting code so that we can format blob types correctly even if they are represented as str rather than bytearray.

      At the moment we ensure blob are of type bytearray via the following shortcut:

      cassandra.cqltypes.BytesType.deserialize = staticmethod(lambda byts, protocol_version: bytearray(byts))
      

      After CASSANDRA-11053 is committed there will be a similar shortcut to override the fast serializers implemented in cython.

      Decoding the CQL type is safer in that it decouples cqlsh formatting from the types returned by the driver deserializers but it is also unnecessary for CASSANDRA-11053 performance goals and risky for older releases.

      Therefore this ticket delivers this functionality but only on trunk.

      Attachments

        Issue Links

          Activity

            People

              stefania Stefania Alborghetti
              stefania Stefania Alborghetti
              Stefania Alborghetti
              Adam Holmberg
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: