When we are creating Metalized view, it is mandatory to add is not null condition for new partition key and clustering key. But why we are adding not null condition for partition key from existing table.
I am asking this question because, partition key can never be null.
for example below table name_data
id(Partition Key) | name | age |
Now, If I want to create Metalized of above table (name_data) to get data by age then, I have to write query.
CREATE MATERIALIZED VIEW name_data_view AS SELECT name, id, age FROM name_data WHERE name IS NOT NULL AND id IS NOT NULL PRIMARY KEY ((name), id) ;
Why We should need to add not null condition for id column. Id Column was a partition key of existing table, that never be a null.
Just a concern . Can you please clarify ?