Validate accessor parameter types against bound statement

Description

From this mailing list discussion.

The type of this accessor parameter doesn't match the underlying CQL type:

The bound statement expects a text but we provide a list<text>. However, if the serialized list matches the format of a string, this isn't get detected at runtime and we returns an empty result set.

Looking at the code:

MethodMapper.ParamMapper#setValue

We know the bound statement and parameter position, so we should be able to extract the actual datatype and use it to serialize the value, instead of relying on a datatype that was inferred from the Java type.

Environment

None

Pull Requests

None

Status

Assignee

Alexandre Dutra

Reporter

Olivier Michallat

Labels

None

PM Priority

None

Affects versions

None

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Sprint

Priority

Major
Configure