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

Throw exception on unknown UDT field

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 2.1 rc3
    • Component/s: Legacy/CQL
    • Labels:
    • Severity:
      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

            • Assignee:
              slebresne Sylvain Lebresne
              Reporter:
              slebresne Sylvain Lebresne
              Authors:
              Sylvain Lebresne
              Reviewers:
              T Jake Luciani
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: