Fix token-aware routing for prepared INSERT and UPDATE queries

Description

The method getRoutingKeyspace is currently implemented as follows in DefaultBoundStatement:

This logic works only for SELECT statements; for INSERT and UPDATE statements, it is broken because preparedStatement.getResultSetDefinitions() returns an empty instance; we should inspect getVariableDefinitions() instead.

Environment

None

Pull Requests

None

Status

Assignee

Olivier Michallat

Reporter

Alexandre Dutra

Labels

None

PM Priority

None

Reproduced in

None

Affects versions

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Priority

Major
Configure