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

feat: add duckdb checks for unsupported column types #164

Merged

Conversation

peasee
Copy link
Collaborator

@peasee peasee commented Nov 7, 2024

🗣 Description

  • Adds behavior for get_schema() in DuckDB connections to explicitly check for unsupported column data types.

This allows catching unsupported data types from tables before the query executes, which usually results in panics when the DuckDB arrow conversion attempts to convert the data instead of a result that can be handled.

  • InvalidTypeAction::Error throws an error.
  • InvalidTypeAction::Warn traces a warning, and excludes the column from the schema.
  • InvalidTypeAction::Ignore silently excludes the column from the schema.

@peasee peasee added the enhancement New feature or request label Nov 7, 2024
@peasee peasee self-assigned this Nov 7, 2024
src/lib.rs Outdated Show resolved Hide resolved
src/duckdb.rs Outdated Show resolved Hide resolved
src/duckdb.rs Outdated Show resolved Hide resolved
src/sql/db_connection_pool/duckdbpool.rs Outdated Show resolved Hide resolved
src/sql/db_connection_pool/duckdbpool.rs Outdated Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
@phillipleblanc phillipleblanc merged commit ebf7a6d into spiceai Nov 7, 2024
3 checks passed
@phillipleblanc phillipleblanc deleted the feat/add-duckdb-checks-for-unsupported-column-types branch November 7, 2024 07:36
zeroxaa added a commit to ReByteAI/datafusion-table-providers that referenced this pull request Nov 22, 2024
…rib#164)

* feat: Add DuckDB checks for unsupported column types

* deps: Update Cargo.toml

* fix: Make serde non-optional, let InvalidTypeAction be Copy

* fix: More features shenanigans
zeroxaa added a commit to ReByteAI/datafusion-table-providers that referenced this pull request Nov 27, 2024
…rib#164)

* feat: Add DuckDB checks for unsupported column types

* deps: Update Cargo.toml

* fix: Make serde non-optional, let InvalidTypeAction be Copy

* fix: More features shenanigans
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.

2 participants