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 support for DuckDB 1.1.0 #4

Merged
merged 1 commit into from
Oct 10, 2024
Merged

Conversation

stenlarsson
Copy link
Contributor

This fixes a number of errors due to changes in DuckDB and ruby-duckdb between 0.5.0 and 1.1.0.

@stenlarsson
Copy link
Contributor Author

To build the gem on my macOS machine I had to specify the duckdb dir. Not sure why it is not found automatically?

CONFIGURE_ARGS=--with-duckdb-dir=$(brew --prefix duckdb) rake install

Also, the GitHub Actions workflow no longer works.

@kou
Copy link
Member

kou commented Oct 3, 2024

Thanks.
I'll fix our CI before I review this. Please wait for a white...

@kou
Copy link
Member

kou commented Oct 9, 2024

Could you rebase on master?

@stenlarsson
Copy link
Contributor Author

Copy link
Member

@kou kou left a comment

Choose a reason for hiding this comment

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

Thanks!

@@ -99,7 +101,7 @@ namespace {
result_ensure_gschema(Result *result)
{
ArrowSchema c_abi_schema;
duckdb_arrow_schema schema = &c_abi_schema;
duckdb_arrow_schema schema = reinterpret_cast<duckdb_arrow_schema>(&c_abi_schema);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
duckdb_arrow_schema schema = reinterpret_cast<duckdb_arrow_schema>(&c_abi_schema);
auto schema = reinterpret_cast<duckdb_arrow_schema>(&c_abi_schema);

@@ -121,7 +123,7 @@ namespace {
result_fetch_internal(VALUE self, Result *result)
{
ArrowArray c_abi_array = {};
duckdb_arrow_array array = &c_abi_array;
duckdb_arrow_array array = reinterpret_cast<duckdb_arrow_array>(&c_abi_array);
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
duckdb_arrow_array array = reinterpret_cast<duckdb_arrow_array>(&c_abi_array);
auto array = reinterpret_cast<duckdb_arrow_array>(&c_abi_array);

@@ -220,7 +222,7 @@ namespace {
query_sql_arrow(VALUE self, VALUE sql)
{
rubyDuckDBConnection *ctx;
Data_Get_Struct(self, rubyDuckDBConnection, ctx);
ctx = get_struct_connection(self);
Copy link
Member

Choose a reason for hiding this comment

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

Could you remove rubyDuckDBConnection *ctx; and use auto ctx = ... instead?

This fixes a number of errors due to changes in DuckDB and ruby-duckdb between 0.5.0 and 1.1.0.
@stenlarsson
Copy link
Contributor Author

Updated according to review comments.

@kou kou merged commit 3b01aee into red-data-tools:master Oct 10, 2024
6 checks passed
@kou
Copy link
Member

kou commented Oct 10, 2024

Thanks!

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.

2 participants