[ https://issues.apache.org/jira/browse/CASSANDRA-20276?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17923724#comment-17923724 ]
Stefan Miklosovic edited comment on CASSANDRA-20276 at 2/4/25 2:28 PM: ----------------------------------------------------------------------- Feel free to take this ticket away from me, I was just curious how easy it will be to build on top of what we have. It was quite straightforward but what I would like to see is this: {code} CREATE TABLE ks.tb (pk int, value int CHECK NOT_NULL, PRIMARY KEY (pk)); {code} instead of the current {code} CREATE TABLE ks.tb (pk int, value int CHECK NOT_NULL(value), PRIMARY KEY (pk)); {code} It seems like "value" is redundant there, but anyway, does not matter too much if we want to be consistent with everything else. I was looking into Parser.g to model this but it seems that in order to bind the name of a column into a constraint, we need to somehow reference it. was (Author: smiklosovic): Feel free to take this ticket away from me, I was just curious how easy it will be to build on top of what we have. It was quit straightforward but what I would like to see is this: {code} CREATE TABLE ks.tb (pk int, value int CHECK NOT_NULL, PRIMARY KEY (pk)); {code} instead of the current {code} CREATE TABLE ks.tb (pk int, value int CHECK NOT_NULL(value), PRIMARY KEY (pk)); {code} It seems like "value" is redundant there, but anyway, does not matter too much if we want to be consistent with everything else. I was looking into Parser.g to model this but it seems that in order to bind the name of a column into a constraint, we need to somehow reference it. > Add not null constraint > ----------------------- > > Key: CASSANDRA-20276 > URL: https://issues.apache.org/jira/browse/CASSANDRA-20276 > Project: Apache Cassandra > Issue Type: Improvement > Components: Feature/Constraints > Reporter: Bernardo Botella Corbi > Assignee: Stefan Miklosovic > Priority: Normal > Fix For: 5.x > > Time Spent: 10m > Remaining Estimate: 0h > > Add a new constraint that checks if a column is null, as defined in CEP-42: > https://cwiki.apache.org/confluence/display/CASSANDRA/CEP-42%3A+Constraints+Framework -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org