-
Notifications
You must be signed in to change notification settings - Fork 75
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
Tracking issue for schema #255
Comments
Test logical replication between different extension version |
Can you elaborate on
Is this an issue with postgres itself? or that it hasn't been implemented in pgvecto? |
Yes. PostgreSQL supports floating-type |
Messaged over in the discord for some help getting the environment setup. But isn't this as simple as: #[pgrx::pg_extern(immutable, parallel_safe, strict)]
fn _vectors_cast_vecf32_to_vecf16(
vector: Vecf32Input<'_>,
_typmod: i32,
_explicit: bool,
) -> Vecf16Output {
let data = vector
.data()
.iter()
.map(|x| x.to_f32())
.map(|x| f16::from_f32(x))
.collect();
Vecf16::new_in_postgres(data)
}
CREATE CAST (vector AS vecf16)
WITH FUNCTION _vectors_cast_vecf32_to_vecf16(vector, integer, boolean) AS IMPLICIT; |
Yes.
It's two issues. You can talk only about the first one since you only need the first one. |
I think float(2) is the same as fp16? |
https://www.postgresql.org/docs/current/datatype-numeric.html#DATATYPE-FLOAT I don't think so. |
Is there more specific definition of |
|
I did not grasp the definition. How should we calculate it for a one-dimensional vector? |
View https://docs.pgvecto.rs/reference/schema.html to see schema provided by pgvecto.rs.
Functions
pgvecto.rs are lack of helper functions, and we need to provide more helper functions.
vector_dims(vector) RETURNS int
, get dimensions of a vector feat: support aggregate function for vector. #463 feat: add vector_norm, vector_dims and normalize for all vector types #485normalize(vector) RETURNS vector
, normalize a vector feat: add vector_norm, vector_dims and normalize for all vector types #485vector_norm(vector) RETURNS real
,avg(vector)
andsum(vector)
feat: support aggregate function for vector. #463vector -> vecf16
: feat: Function / cast to convert vectors into vecf16 #262 feat: Add vector to vecf16 CAST #266vecf16 -> vector
,vector -> svector
,svector -> vector
: feat: support sparse vector #299casts betweennot supportedvecf16
andhalf precision[]
: PostgreSQL do not supporthalf precision[]
, we may make some decisions hereTypes
Schema
CI
CREATE FUNCTION export_name
SQL using the name_vectors_*_wrapper
and the SQL is inconsistent with the signture defined in the code./src/install
for a releaseContributing
If you want to export a user function to PostgreSQL:
pgrx::pg_extern
and name the function_vectors_*
CREATE FUNCTION export_name
infinalize.sql
, you can use the name_vectors_*_wrapper
here.If you want to export a cast, operator or something else to PostgreSQL:
pgrx::pg_extern
and name the function_vectors_*
finalize.sql
The text was updated successfully, but these errors were encountered: