Maxwell-Guo commented on code in PR #2655:
URL: https://github.com/apache/cassandra/pull/2655#discussion_r1379540221
##########
src/java/org/apache/cassandra/cql3/Terms.java:
##########
@@ -47,225 +47,515 @@ public Object get(int index)
@Override
public int size()
{
- return 0;
+ throw new UnsupportedOperationException();
+ }
+ };
+
+ Terminals UNSET_TERMINALS = new Terminals()
+ {
+ @Override
+ @SuppressWarnings("unchecked")
+ public List<ByteBuffer> get()
+ {
+ return (List<ByteBuffer>) UNSET_LIST;
+ }
+
+ @Override
+ @SuppressWarnings("unchecked")
+ public List<List<ByteBuffer>> getElements()
+ {
+ return (List<List<ByteBuffer>>) UNSET_LIST;
+ }
+
+ @Override
+ public List<Terminal> asList()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void addFunctionsTo(List<Function> functions)
+ {
+
Review Comment:
it seems that other addFuntionsTo function with empty implementation are all
letf with empty function body.
What I originally wanted to say was what about add some comments like "//
no-op" if it was empty, but it seems unnecessary as other function is done
that way(just left empty body).
--
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]