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

Base table PRIMARY KEY can be assumed to be NOT NULL in MV creation

    XMLWordPrintableJSON

    Details

      Description

      CREATE TABLE users (
          id uuid PRIMARY KEY,
          username text,
          email text,
          age int
      );
      
      CREATE MATERIALIZED VIEW users_by_username AS SELECT * FROM users WHERE username IS NOT NULL PRIMARY KEY (username, id);
      
      InvalidRequest: code=2200 [Invalid query] message="Primary key column 'id' is required to be filtered by 'IS NOT NULL'"
      

        Attachments

          Activity

            People

            • Assignee:
              carlyeks Carl Yeksigian
              Reporter:
              jbellis Jonathan Ellis
              Authors:
              Carl Yeksigian
              Reviewers:
              T Jake Luciani
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: