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

Add New Vector Functions #5120

Open
13 of 21 tasks
zhongzc opened this issue Dec 9, 2024 · 5 comments
Open
13 of 21 tasks

Add New Vector Functions #5120

zhongzc opened this issue Dec 9, 2024 · 5 comments
Labels
C-feature Category Features good first issue Good for newcomers tracking-issue A tracking issue for a feature.

Comments

@zhongzc
Copy link
Contributor

zhongzc commented Dec 9, 2024

What problem does the new feature solve?

We seek external contributors to help us implement various functions for vector operations in GreptimeDB. You can refer to this PR as a guide for implementing vec_scalar_add. Below is a list of functions we are considering. Each function comes with a brief description.

Please respond below with the function(s) you would like to contribute, ensuring to avoid overlap with other contributors. We look forward to your valuable contributions!

What does the feature do?

Vector Basic Functions:

Vector Properties/Access Functions:

  • VEC_DIM(vec): Returns the dimension of the vector.
  • VEC_KTH_ELEM(vec, k): Returns the k-th element of the vector.
  • VEC_SUBVECTOR(vec, start, end): Returns a subvector from start to end index.

Conversion Functions (JSON <-> Vector):

  • JSON_TO_VEC: Converts a JSON Array to a Vector.
  • VEC_TO_JSON: Converts a Vector to a JSON Array.

Conversion Functions (String <-> Vector):

Vector Distance Functions:

... Other possible functions

Implementation challenges

No response

@zhongzc zhongzc added good first issue Good for newcomers C-feature Category Features labels Dec 9, 2024
@killme2008 killme2008 added the tracking-issue A tracking issue for a feature. label Dec 9, 2024
@linyihai
Copy link
Contributor

I'd look into VEC_SCALAR_MUL(f32, vec) :)

@wty4427300
Copy link

I want to try VEC_ADD(vec0, vec1):

@killme2008
Copy link
Contributor

I'd look into VEC_SCALAR_MUL(f32, vec) :)

Cool, thank you!

@killme2008
Copy link
Contributor

I want to try VEC_ADD(vec0, vec1):

Thanks!

@linyihai
Copy link
Contributor

I'd like to implement VEC_DIV(vec0, vec1) also due to it very similar to vec_mul.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category Features good first issue Good for newcomers tracking-issue A tracking issue for a feature.
Projects
None yet
Development

No branches or pull requests

4 participants