elixir-explorer / adbc

Apache Arrow ADBC bindings for Elixir
https://arrow.apache.org/adbc/
Apache License 2.0
50 stars 16 forks source link

Add Duck DB Support #59

Closed lkarthee closed 7 months ago

lkarthee commented 7 months ago
Adbc.download_driver!(:duckdb)

children = [
  {Adbc.Database,
   [
     driver: :duckdb,
     entrypoint: "duckdb_adbc_init",
     process_options: [name: MyApp.DB]
   ]},
  {Adbc.Connection, [database: MyApp.DB, process_options: [name: MyApp.Conn]]}
]
Supervisor.start_link(children, strategy: :one_for_one)
cocoa-xu commented 7 months ago

It seems that the PR is kinda stale and I had a bit of time, so I picked up from where @lkarthee was. I've addressed the issues in the code review, and now we're using update.exs to generate driver URLs for DuckDB in adbc_driver.ex.

Although calling update.exs with a ton of arguments may not be the best way to do it (see below) but perhaps let's refactor that in another PR (or when it's needed)?

elixir update.exs 0.11.0 duckdb-v0.10.1 apache-arrow-adbc-0.11.0-rc0
lkarthee commented 7 months ago

Thank you @cocoa-xu .

josevalim commented 7 months ago

@cocoa-xu what if we hardcode the latest versions at the top of update.exs instead of passing them as arguments? This way we bump the version and run it. Otherwise we will need to keep track of the last versions of everything.

josevalim commented 7 months ago

:green_heart: :blue_heart: :purple_heart: :yellow_heart: :heart:

cocoa-xu commented 7 months ago

@cocoa-xu what if we hardcode the latest versions at the top of update.exs instead of passing them as arguments? This way we bump the version and run it. Otherwise we will need to keep track of the last versions of everything.

I think perhaps another way is find the latest version using GitHub API? I can try it out today if this approach sounds okay to you/

josevalim commented 7 months ago

I pushed a refactoring. :) @cocoa-xu we should probably release v0.3.0. What do you think?

josevalim commented 7 months ago

@cocoa-xu sorry, I saw your comments just now. I would prefer to leave the versions hardcoded for now, so we have control over when and what to update. What do you think?

cocoa-xu commented 7 months ago

I pushed a refactoring. :) @cocoa-xu we should probably release v0.3.0. What do you think?

Yeah, let’s release v0.3.0. I’m outside at the moment so please release it, or I can do the release once I’m at home. ;)

cocoa-xu commented 7 months ago

@cocoa-xu sorry, I saw your comments just now. I would prefer to leave the versions hardcoded for now, so we have control over when and what to update. What do you think?

No worries! Then let’s go with the hard-coded way/