Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR fixes a bug causing shotover to error out when processing cassandra custom types.
In doing so we enable support for cassandra 5's new vector types.
The problem is that the cassandra-protocol crate will return an Error when it tries to parse a Custom cassandra value, this makes sense from the perspective of the crate since it does not know how to handle this type. If the user wants to use the custom type they should use a driver that knows about this type.
However from the shotover perspective its reasonable for the client and cassandra to use a custom type that shotover knows nothing about, in this case we should just pass on the bytes as is.
To achieve this we add an enum
CustomOrStandardType
which allows us to store either a Custom type (not supported by cassandra-protocol) or any other standard type supported by cassandra-protocol.Long term I consider this a hack, but unless we have a push to improve cassandra performance I think we'll be living with this hack forever.
As demonstrated here the java driver only supports 4 data types for use with vectors. So even though cassandra returns results for the other data types that could in theory be interpreted by a driver, we dont test those since there's no way to do that through the java driver. Shotover doesn't parse these anyway so in reality the coverage isnt important.