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

CASSGO-11 Support vector type #1828

Open
wants to merge 23 commits into
base: trunk
Choose a base branch
from

Conversation

lukasz-antoniak
Copy link
Member

@lukasz-antoniak lukasz-antoniak commented Oct 10, 2024

Fix #1734.

Complete vector type support for GoCQL. Supports fixed and variable-length vector types (e.g. vector of floats, vector of list of text).

@joao-r-reis joao-r-reis mentioned this pull request Oct 14, 2024
marshal.go Outdated Show resolved Hide resolved
@tengu-alt
Copy link

Have you tested it with protoV5? If not I would be glad to handle it with #1822.

marshal.go Outdated Show resolved Hide resolved
@joao-r-reis
Copy link
Contributor

Have you tested it with protoV5?

Hmm protocol v5 shouldn't matter much here, the encoding of the type itself is the same regardless of whether v4 or v5 is being used.

Copy link
Contributor

@joao-r-reis joao-r-reis left a comment

Choose a reason for hiding this comment

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

It's looking solid, I left a few comments. Also note that you left a few TODOs.

helpers.go Outdated Show resolved Hide resolved
helpers.go Outdated Show resolved Hide resolved
helpers.go Outdated Show resolved Hide resolved
helpers.go Outdated Show resolved Hide resolved
helpers.go Outdated Show resolved Hide resolved
helpers.go Outdated Show resolved Hide resolved
metadata_test.go Show resolved Hide resolved
metadata_test.go Outdated Show resolved Hide resolved
metadata_test.go Outdated Show resolved Hide resolved
frame.go Outdated Show resolved Hide resolved
@joao-r-reis joao-r-reis changed the title Support vector type CASSGO-11 Support vector type Oct 24, 2024
metadata.go Outdated Show resolved Hide resolved
metadata.go Outdated Show resolved Hide resolved
helpers.go Outdated Show resolved Hide resolved
Copy link
Contributor

@joao-r-reis joao-r-reis left a comment

Choose a reason for hiding this comment

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

I like it 👍 added a couple of small comments

helpers.go Outdated Show resolved Hide resolved
helpers.go Outdated Show resolved Hide resolved
helpers.go Outdated Show resolved Hide resolved
metadata.go Outdated Show resolved Hide resolved
Copy link
Contributor

@joao-r-reis joao-r-reis left a comment

Choose a reason for hiding this comment

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

Good stuff 👍

marshal.go Outdated
}
if k == reflect.Array {
if rv.Len() != info.Dimensions {
return unmarshalErrorf("unmarshal vector: array with wrong size")
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: maybe add the expected and provided sizes to the error message

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

vector_test.go Outdated
{name: "smallint", cqlType: TypeSmallInt.String(), value: []int16{127, 256, -1234}},
{name: "tinyint", cqlType: TypeTinyInt.String(), value: []int8{127, 9, -123}},
{name: "duration", cqlType: TypeDuration.String(), value: []Duration{duration1, duration2, duration3}},
// TODO(lantonia): Test vector of custom types
Copy link
Contributor

Choose a reason for hiding this comment

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

NIT: a couple of TODOs in this test still

Copy link
Member Author

Choose a reason for hiding this comment

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

👍

@@ -197,5 +242,6 @@ jobs:
sleep 30s
- name: Integration tests
run: |
source ~/venv/bin/activate
Copy link
Contributor

Choose a reason for hiding this comment

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

just a reminder to remove the workflow changes from this PR before wrapping up (we'll have to potentially merge #1833 first) when we get a second +1

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, this PR will wait for #1833. I will remove workflow changes form this PR, rebase and squash commits.

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.

CASSGO-11 Feature Request: Support Vector Type
3 participants