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

Throw exception on unknown UDT field

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 2.1 rc3
    • Legacy/CQL
    • Low

    Description

      Currently, the following code:

      CREATE TYPE foo (f : int);
      CREATE TABLE test (k int PRIMARY KEY, v foo);
      
      INSERT INTO test (k, v) VALUES (0, { s : ?})
      

      will crash, because the s field is not part of type foo and it's not caught. The consequence being that the metadata for the bindMarker ends up being null and some NPE is thrown. We should throw a proper exception instead.

      Attachments

        1. 7484.txt
          11 kB
          Sylvain Lebresne

        Activity

          People

            slebresne Sylvain Lebresne
            slebresne Sylvain Lebresne
            Sylvain Lebresne
            T Jake Luciani
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: