smiklosovic commented on code in PR #4115:
URL: https://github.com/apache/cassandra/pull/4115#discussion_r2073120494


##########
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]
+    : '('  ')'
+    | '(' c=term { try { arguments.add(c.toString()); } catch (Throwable t) { 
throw new SyntaxException("Constraint function parameters need to be 
strings."); }; } (',' cn=term { try { arguments.add(cn.toString()); } catch 
(Throwable t) { throw new SyntaxException("Constraint function parameters need 
to be strings."); }; })* ')'
+    | '(' ci=ident { throw new SyntaxException("Constraint function parameters 
need to be strings."); } (',' cni=ident)* ')'

Review Comment:
   yes, because as explained above, `constraint(val)` - here it is "ident" for 
Antlr but it fails when we accept terms which a strings. For `constraint(1)` - 
this seems to just work fine tho.



-- 
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

Reply via email to