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-3101: CqlVector#from subtypeCodec parameter missing javadoc description #1739

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

Conversation

SiyaoIsHiding
Copy link
Contributor

No description provided.

Copy link
Contributor

@absurdfarce absurdfarce left a comment

Choose a reason for hiding this comment

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

Looks good @SiyaoIsHiding ! A few small things to take a look at but you're off to a great start!

java-driver-parent.ipr Outdated Show resolved Hide resolved
@@ -84,7 +84,7 @@ public static <V extends Number> CqlVector<V> newInstance(List<V> list) {
* </code> call on some CqlVector should return a CqlVector that is equal to the origin instance.
*
* @param str a String representation of a CqlVector
* @param subtypeCodec
* @param subtypeCodec the TypeCodec to parse the String representation
Copy link
Contributor

Choose a reason for hiding this comment

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

This is true but it doesn't really tell us which string representation we're talking about :)

Vectors in CQL have a form that looks something like this:

org.apache.cassandra.db.marshal.VectorType(org.apache.cassandra.db.marshal.FloatType,3)

The first parameter there is the subtype of this vector, that is the type of values it contains. The second is it's size parameter.

The subtypeCodec in CqlVector is intended to parse the string representation of the subtype so that we can build new instances of that subtype for the values contained by the vector. So you probably want to say something like "the codec to parse the string representation of subtype values" here (or something similar) in order to make it very clear what values we're talking about.

Make sense?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for your detailed explanation! Just changed to the TypeCodec to parse the string representation of subtype values.

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