Make CodecRegistry available to ProtocolDecoder

Description

Currently ProtocolDecoder does not have access to CodecRegistry.

This has a couple of problems; in a result of type ROWS:

  • when a DataType is read, DataType.decode() is called with a "temporary" CodecRegistry;

  • when a ColumnDefinitions instance is created, its codecRegistry field is temporarily set to null;

This abnormal state is only restored later on, when either ArrayBackedResultSet or DefaultPreparedStatement sets the cluster's CodecRegistry into ColumnDefinitions which in turn propagates it to all {{DataType}}s in the metadata.

This is clumsy; using Netty's channel context, it should be possible to set the CodecRegistry to use so that it is directly available to ProtocolDecoder.

Environment

None

Pull Requests

None
Fixed

Assignee

Unassigned

Reporter

Alexandre Dutra

Labels

None

PM Priority

None

Affects versions

Fix versions

Pull Request

None

Doc Impact

None

Size

S

External issue ID

None

External issue ID

None

Priority

Minor
Configure