[
https://issues.apache.org/jira/browse/CASSANDRA-7660?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14349442#comment-14349442
]
Benjamin Lerer commented on CASSANDRA-7660:
-------------------------------------------
I noticed the following things:
* In {{VariableSpecifications.getPartitionKeyBindIndexes(CFMetaData cfm)}} the
following line seems suspicious to me:
{{if (!targetColumn.ksName.equals(cfm.cfName) ||
!targetColumn.cfName.equals(cfm.ksName))}}
* The constructor {{Prepared(CQLStatement, VariableSpecifications)}} does not
look to used anywhere.
* I feel that it will be more natural for
{{allInSameCF(List<ColumnSpecification> names)}} to be in
{{ColumnSpecification}} instead of in {{ResultMetadata}}.
* I think that it would have been clearer to check for multiple cfm in
{{BatchStatement}} rather than in
{{VariableSpecification.getPartitionKeyBindIndexes}} even if it is probably
less efficient.
* I did not see any existing tests covering the serialization/deserialization
of {{ResultMessage}} but I might have missed them. In case we do not have some
it would be probably good to add some.
I had a look at the python driver code but I think that it would be good if
someone else than me had a look at it as I am not that familiar with the driver.
Otherwise, I have found the change to the native protocol document quite clear.
> Indicate PK columns in "prepared" native protocol responses
> -----------------------------------------------------------
>
> Key: CASSANDRA-7660
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7660
> Project: Cassandra
> Issue Type: Sub-task
> Components: Core
> Reporter: Tyler Hobbs
> Assignee: Tyler Hobbs
> Labels: protocolv4
> Fix For: 3.0
>
> Attachments: 7660-trunk.txt
>
>
> Currently, when native protocol drivers prepare statements, they need to
> check their internal representation of the schema to determine which, if any,
> of the columns are part of the partition key. If the native protocol
> response indicated this, it would remove the drivers' dependency on having an
> internal representation of the schema when preparing statements.
> This would need to go in the v4 protocol.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)