Skip to content

Tweak UDT and tuple handling.

This merge request contains a few suggestions to the handling of UDT and tuple columns:

  • Remove the "keyspace" from the UdtColumn constructor. It makes it impossible to use a configurable keyspace in an application together with UDTs since the keyspace cannot be provided in the implementation of the ctype typeclass method in such a scenario. Furthermore, UDTs are constrained to the keyspace they are defined in [1], so that comparing keyspace names during the "typechecking" of a response to a request that is itself confined to a single keyspace does not seem to add much value.

  • Adjust the typechecking of UDT columns in responses to include the type name as well as the field names and their types.

  • Adjust the typechecking of tuple columns in responses to use a proper recursive type equality check over the components (e.g. the current typecheck for tuples produces spurious errors on varchar vs text).

Thereby I removed the encodeColumnType function since column types are never encoded by CQL clients according to the protocol.

[1] https://issues.apache.org/jira/browse/CASSANDRA-6643

Merge request reports

Loading