Skip to content

Improve DuckDB insert performance; support Postgres materialized views; MySQL connection metrics #311

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

Merged
merged 20 commits into from
Apr 10, 2025

Conversation

phillipleblanc
Copy link
Collaborator

Merges in fixes made to the spiceai branch that cover the following three main areas:

sgrebnov and others added 20 commits March 11, 2025 20:19
* Add indexes mismatch detection for DuckDB table creation

* Update src/duckdb.rs

Co-authored-by: Luke Kim <80174+lukekim@users.noreply.github.com>

* Update src/duckdb.rs

Co-authored-by: Luke Kim <80174+lukekim@users.noreply.github.com>

* Update src/duckdb.rs

---------

Co-authored-by: Luke Kim <80174+lukekim@users.noreply.github.com>
)

* Defer index/constraint creation until after the initial data load.

* revert: Apply primary keys only at table creation

---------

Co-authored-by: peasee <98815791+peasee@users.noreply.github.com>
* wip

* refactor: New TableCreator interfaces for DuckDB

* wip: Add some stubbed tests

* wip: #[ignore] not #[skip]

* test: Add creator.rs tests

* test: Add overwrite and append tests

* fix: Add schema validation back, add more unit tests

* refactor: Rename TableCreator::list_internal_tables

* chore: Remove commented out code

* Switch from Appender to duckdb_arrow_scan (#288)

* Switch from Appender to duckdb_arrow_scan

* Fix duckdb-rs commit

* Update src/duckdb.rs

Co-authored-by: Luke Kim <80174+lukekim@users.noreply.github.com>

---------

Co-authored-by: Luke Kim <80174+lukekim@users.noreply.github.com>

* duckdb-rs commit from spiceai-1.1.3-backported

* refactor: Append reuses existing base table, more tests, ViewCreator

* fix: InsertOp::Replace needs Append

* Add temp directory parameter (#289)

* refactor: Make TableDefinition PartialEq all of the time

* review: Rename TableCreator to TableManager, use option for internal table state

* refactor: Update error messaging on indexes

* Apply suggestions from code review

Co-authored-by: Phillip LeBlanc <phillip@leblanc.tech>

* fix: Address internal tables that are subsets or other table names

* feat: Add TableDefinition function to determine if it exists

* fix: Allow TableDefinition::name() to be public

* clippy: must_use

---------

Co-authored-by: Phillip LeBlanc <phillip@leblanc.tech>
Co-authored-by: Luke Kim <80174+lukekim@users.noreply.github.com>
…r DuckDB (#290)

* fix: Make initial table if none exist for DuckDB

* refactor: Defer indexes to after first append load

* test: Update tests for append

* fix: Index detection for overwrite mode

* clippy: Reference immediately dereferenced

* test: Fix table creator tests
…275)

* Add connection_pool_size parameter for duckdb table provider

* fix tests

* remove user configured connection_pool param, add min_idle configuration to pool

* fix

* apply suggestions

* fix tests

* add DuckDBConnectionPoolBuilder method

* remove idle size calculation, introduce non-breaking get_or_init instance methods

* fix tests

* Add mode to DuckDbConnectionPoolBuilder, remove lifetime for DuckDBConnectionPoolBuilder

* move build pool functionality into the DuckDB ConnectionPool Builder

* Use builder when get_or_init instance

* only pass pool to the get_or_init_instance_with_builder

* remove unnecessary error
…rialized views (#300)

* Update the PostgreSQL query to support inferring the schema from materialized views

* update postgres schema tests, to use complex table for views

* Update examples/postgres.rs

* Update examples/postgres.rs
…eters (#302)

* Upgrade mysql_async, expose metrics and remove unnecessary type parameters

* Fix lint issue
* Support the `pool_min` and `pool_max` parameters

* Support the `pool_min` and `pool_max` MySQL connection parameters

* Exercise the pool_min/pool_max options
@phillipleblanc phillipleblanc self-assigned this Apr 10, 2025
@phillipleblanc phillipleblanc requested a review from peasee April 10, 2025 06:03
@phillipleblanc phillipleblanc added the enhancement New feature or request label Apr 10, 2025
@phillipleblanc phillipleblanc added this to the v0.4.0 milestone Apr 10, 2025
@phillipleblanc phillipleblanc merged commit bc7c00c into main Apr 10, 2025
3 checks passed
@phillipleblanc phillipleblanc deleted the phillip/250410-spiceai-upstream branch April 10, 2025 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants