maedhroz commented on code in PR #2195:
URL: https://github.com/apache/cassandra/pull/2195#discussion_r1134681157
##########
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;
Review Comment:
If we set this to something lower (let's say 38), and then run
`shouldRejectIllegalLimitInLet()`, you encounter a situation where the `Bounds`
points to non-existent raw data. I suppose this won't be problematic unless we
have very large statements.
In `CQLFragmentParser#parseAnyUnhandled()`, I think we already have the
`Bounds` objects we would later use to filter the raw text, right? What if,
instead of filtering later, and storing the raw text for the entire enclosing
statement, we filter each statement in `CQLFragmentParser#parseAnyUnhandled()`
avoiding the need for a limit in the first place? The individual statement
would just get the simple bounds and the text from the raw statement text
within those bounds...and we'd be able to present the error the same way (I
think).
WDYT?
--
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]