akhaku commented on code in PR #1635: URL: https://github.com/apache/cassandra-java-driver/pull/1635#discussion_r1524006033
########## core/src/main/java/com/datastax/oss/driver/internal/core/type/codec/UdtCodec.java: ########## @@ -105,10 +105,7 @@ public UdtValue decode(@Nullable ByteBuffer bytes, @NonNull ProtocolVersion prot int i = 0; while (input.hasRemaining()) { if (i == cqlType.getFieldTypes().size()) { - throw new IllegalArgumentException( - String.format( - "Too many fields in encoded UDT value, expected %d", - cqlType.getFieldTypes().size())); + break; Review Comment: Yes, that's the scenario we ran into, and I can't think of any other scenarios. Fair, a no-spam warn is a good idea but it doesn't look like the client currently has a no-spam logger. I could copy the one from the server but maybe not the best thing to do in this PR... and a vanilla log warn would be bad here since it would get logged every time we decode a UDT field matching that scenario. Thoughts? -- 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: commits-unsubscr...@cassandra.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org