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

Fix SQLite Invalid column type Real error #98

Merged
merged 2 commits into from
Sep 15, 2024

Conversation

sgrebnov
Copy link
Collaborator

@sgrebnov sgrebnov commented Sep 14, 2024

As detailed at Bug: SQLite acceleration fails with Invalid column type Real TPCH Q10 and Q19 the SQLite Table Provider was failing with the following error when attempting to read a Float value as an Integer. This issue occurs when a query returns the first row for a Float column with a value without a fractional component, which SQLite represents as an Integer.

Execution error: Unable to query arrow: ConnectionError Other("Failed to convert query result to Arrow: Failed to extract row value: Invalid column type Real at index: 3, name: l_discount")

The PR updated the schema inference to use the projected schema to accurately determine if the column is actually a Float.

Note: The error has a stable repro but occurs only in in-memory mode.

@phillipleblanc phillipleblanc merged commit fa0c7c7 into spiceai Sep 15, 2024
3 checks passed
@phillipleblanc phillipleblanc deleted the sgrebnov/fix-sqlite-float-issue branch September 15, 2024 05:55
@sgrebnov sgrebnov self-assigned this Sep 15, 2024
This pull request was closed.
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