Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JAVA-3143: Extend driver vector support to arbitrary subtypes and fix handling of variable length types (OSS C* 5.0) #1952

Open
wants to merge 25 commits into
base: 4.x
Choose a base branch
from

Conversation

SiyaoIsHiding
Copy link
Contributor

No description provided.

@SiyaoIsHiding
Copy link
Contributor Author

This branch is on top of #1931

@@ -196,7 +233,8 @@ public int hashCode() {

@Override
public String toString() {
return Iterables.toString(this.list);
TypeCodec<T> subcodec = CodecRegistry.DEFAULT.codecFor(list.get(0));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously we promised that CqlVector.from should mirror CqlVector.toString. CqlVector.from has access to a subtype codec and expects some values to be single-quoted, e.g. texts. Therefore, without this change to toString, a round-trip test like CqlVector.from(vector1.toString(), codec); will fail. However, fetching the default codec for the subtype looks like too much effort for something simple like toString.

@@ -49,6 +50,7 @@ public class DefaultSelect implements SelectFrom, Select {
private final ImmutableList<Relation> relations;
private final ImmutableList<Selector> groupByClauses;
private final ImmutableMap<CqlIdentifier, ClusteringOrder> orderings;
private final Ann ann;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we expose a getter like for other fields?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants