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

Support more data types #4

Open
2 tasks
wangfenjin opened this issue Jul 7, 2021 · 2 comments
Open
2 tasks

Support more data types #4

wangfenjin opened this issue Jul 7, 2021 · 2 comments
Assignees

Comments

@wangfenjin
Copy link
Collaborator

wangfenjin commented Jul 7, 2021

Currently duckdb c api doesn't support all data types, also the duckdb_value_* and duckdb_bind_* methods are not complete.

We need to:

  • Support duckdb_bind_* api
  • Support more type in row.rs#value_ref

It will be a good issue to work on if you want to be familiar with both duckdb codebase and also this rust repo

@wangfenjin
Copy link
Collaborator Author

As we use arrow to query data #8 , so we don't need duckdb_value_* API, only need duckdb_bind_* to bind params

@wangfenjin wangfenjin self-assigned this Aug 1, 2021
@wangfenjin wangfenjin removed the help wanted Extra attention is needed label Aug 1, 2021
@saeedzareian
Copy link

saeedzareian commented Sep 21, 2023

Hello, I started looking at this issue but I am new to Rust so I need a little hand holding.

I added List and Map (Dictionary) to ValueRef like below:

#[derive(Copy, Clone, Debug, PartialEq)]
pub enum ValueRef<'a> {
   // previous types
    Map(Box<[(String, ValueRef<'a>)]>),
    List(Box<[ValueRef<'a>]>),

}

They are recursive/nested data structures and variable length. So I needed to put them in a Box. However, the Rust compiler doesn't like Copy for Box. If I remove the Copy, then I have to use clone everywhere in the code base.

I saw your Todo note to covert the list to string:

            // DataType::List(_) => make_string_from_list!(column, row),

Was this your solution for the situation above? Do you have any other thoughts in your mind for me to start this?

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

2 participants