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

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

            Dates

              Created:
              Updated:
              Resolved: