adelapena commented on code in PR #1739:
URL: https://github.com/apache/cassandra/pull/1739#discussion_r928764151


##########
src/antlr/Parser.g:
##########
@@ -414,12 +414,12 @@ simpleUnaliasedSelector returns [Selectable.Raw s]
     ;
 
 selectionFunction returns [Selectable.Raw s]
-    : K_COUNT '(' '\*' ')'                      { $s = 
Selectable.WithFunction.Raw.newCountRowsFunction(); }
-    | K_MAXWRITETIME '(' c=sident ')'           { $s = new 
Selectable.WritetimeOrTTL.Raw(c, 
Selectable.WritetimeOrTTL.Kind.MAX_WRITE_TIME); }
-    | K_WRITETIME '(' c=sident ')'              { $s = new 
Selectable.WritetimeOrTTL.Raw(c, Selectable.WritetimeOrTTL.Kind.WRITE_TIME); }
-    | K_TTL       '(' c=sident ')'              { $s = new 
Selectable.WritetimeOrTTL.Raw(c, Selectable.WritetimeOrTTL.Kind.TTL); }
-    | K_CAST      '(' sn=unaliasedSelector K_AS t=native_type ')' {$s = new 
Selectable.WithCast.Raw(sn, t);}
-    | f=functionName args=selectionFunctionArgs { $s = new 
Selectable.WithFunction.Raw(f, args); }
+    : K_COUNT        '(' '\*' ')'                                    { $s = 
Selectable.WithFunction.Raw.newCountRowsFunction(); }
+    | K_MAXWRITETIME '(' c=sident m=selectorModifier[c] ')'          { $s = 
new Selectable.WritetimeOrTTL.Raw(c, m, 
Selectable.WritetimeOrTTL.Kind.MAX_WRITE_TIME); }

Review Comment:
   Yes, `maxwritetime` can be applied to entire collections, slices and 
collection items :)
   
   It's verified for all the test cases in `WritetimeOrTTLTest`, 
[here](https://github.com/apache/cassandra/blob/a1c6828d186ee7ac36e8965b70930341d1ea5196/test/unit/org/apache/cassandra/cql3/validation/entities/WritetimeOrTTLTest.java#L1086-L1091)
 and 
[here](https://github.com/apache/cassandra/blob/a1c6828d186ee7ac36e8965b70930341d1ea5196/test/unit/org/apache/cassandra/cql3/validation/entities/WritetimeOrTTLTest.java#L1116-L1122).



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to