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

Possible Arrow Float64 <=> DuckDB FLOAT mapping bug #457

Open
ctsk opened this issue Mar 6, 2025 · 1 comment
Open

Possible Arrow Float64 <=> DuckDB FLOAT mapping bug #457

ctsk opened this issue Mar 6, 2025 · 1 comment

Comments

@ctsk
Copy link

ctsk commented Mar 6, 2025

As far as I understand....

I believe Arrow's DataType::Float64 should be mapped to DuckDB's DOUBLE -- and DataType::Float32 is DuckDB's FLOAT.

// DataType::Float16 => Self::Float16,
// DataType::Float32 => Self::Float32,
DataType::Float64 => Self::Float,

Is it a bug that this snippet is mapping DataType::Float64 to FLOAT?

@ctsk
Copy link
Author

ctsk commented Mar 6, 2025

How I got here:

  • I wanted to store embeddings in a duckdb database -- These embeddings are a Vec<f32>, and represented as FLOAT[<DIM>] in the database
  • Storing a Value::Array(Vec<f32>) in the database failed due to an unimplemented! code path here
    Value::List(..) | Value::Struct(..) | Value::Map(..) | Value::Array(..) | Value::Union(..) => {
    unimplemented!()
    }
  • I then converted my representation into a FixedSizeListArray, aiming to pass ValueRef::Array(&FixedSizeListArray, usize) as a parameter to execute and hit the unimplemented! code path for DataType::Float32 in the issue above...

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

No branches or pull requests

1 participant