dcapwell commented on code in PR #4322:
URL: https://github.com/apache/cassandra/pull/4322#discussion_r2286168441
##########
src/java/org/apache/cassandra/utils/ByteBufferUtil.java:
##########
@@ -570,6 +570,7 @@ public static double toDouble(ByteBuffer bytes)
public static ByteBuffer objectToBytes(Object obj)
{
+ if (obj == null) return null;
Review Comment:
> Seems like a big change to the contract of this non-test method.
its in `src` but its only usage is `test`. Its unsafe and doesn't actually
make sense outside of tests as you *must* use the `AbstractType`.
> Are we actually supposed to support null bind values?
we do but its handled differently in the client protocol. The AST fuzz
jvm-dtest tests use the client protocol which supports null (and undefined,
which isn't tested atm). But when you do jvm-dtest or cqltester we bypass the
client protocol and handling and try to guess the types, so need this line to
properly handle what we do in client layer.
--
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]