maedhroz commented on code in PR #2195:
URL: https://github.com/apache/cassandra/pull/2195#discussion_r1134593113


##########
src/java/org/apache/cassandra/cql3/statements/QualifiedStatement.java:
##########
@@ -81,13 +81,27 @@ public String toString()
 
     public static abstract class Composite extends QualifiedStatement
     {
+        private static final int RAW_TEXT_MAX_LENGTH = 4096;
+
+        private String txt;
+
         Composite()
         {
             super(null);
         }
 
         protected abstract Iterable<? extends QualifiedStatement> 
getStatements();
 
+        public void setRawText(String txt)
+        {
+            this.txt = txt != null ? txt.substring(0, Math.min(txt.length(), 
RAW_TEXT_MAX_LENGTH)) : null;

Review Comment:
   nit: if we actually do exceed the max length, it might be a nice UX tweak to 
include a "blah blah..." (ellipsis) at the end just to make it clear there's 
more content (but we're truncating).



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