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

Allow empty blob literals in CQL3

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.5
    • None
    • None
    • Low

    Description

      The current grammar don't allow empty blob literals (so '0x'). The goal here is to allow the following syntax for that:

      INSERT INTO test(k, b) VALUES (0, 0x)
      

      I'll admit that '0x' is not the most beautiful syntax ever, but I think that's the only thing that make sense.

      I'll note that currently there is 2 workaround to insert empty blobs: you can either use prepared statement (not a bad idea when using blobs anyway) or, because we've deprecated but still support until 2.0 using strings as blob (to allow upgrade from 1.2.0 to 1.2.1), you can use an empty string. I'll note that this latter workaround will trigger a deprecation warning in the log however and will stop working in 2.0.

      Attachments

        1. 5452.txt
          0.6 kB
          Sylvain Lebresne

        Activity

          People

            slebresne Sylvain Lebresne
            slebresne Sylvain Lebresne
            Sylvain Lebresne
            Aleksey Yeschenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: