smiklosovic commented on code in PR #4115: URL: https://github.com/apache/cassandra/pull/4115#discussion_r2058611262
########## src/antlr/Parser.g: ########## @@ -997,6 +1018,12 @@ columnMaskArguments[List<Term.Raw> arguments] : '(' ')' | '(' c=term { arguments.add(c); } (',' cn=term { arguments.add(cn); })* ')' ; +columnConstraintsArguments[List<String> arguments] Review Comment: I know this is a little bit hairy but ... believe me, I spent quite a while on this. when we have `val text check someconstraint(val)` it will look at `val` as on "identifier" - `ident` and that is illegal. But when you do `val text check someconstraint('parameter')` it will look at `parameter` as on `term` which is String. What is interesting is that this `val text check someconstraint('parameter', 1)` will pass, because for antlr here, `1` is _not_ `ident` it is `term`. `1` is not _identifier_. That means that you can do also `val text check someconstraint(1,2,3)` We need to be very careful here because this is going to CQL describe and we need to show it there the same way it is declared on creation. However, when working with arguments in the code, they will be also here quoted. I find it way easier to _unquote_ them and work with it like that. It will be visible in the code how I am unquoting it and using raw arguments for CQL description only. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: pr-unsubscr...@cassandra.apache.org For additional commands, e-mail: pr-h...@cassandra.apache.org