-
Notifications
You must be signed in to change notification settings - Fork 173
Milestone
Description
It seems something significant has changed between the 0.5.x and 0.6.x releases, as the standard main1 db schema can no longer be referenced in SQLite queries, and neither can table names that need to be quoted.
The following minimal test-cases demonstrate the issues:
-
Setup
from adbc_driver_sqlite.dbapi import connect import pyarrow as pa data = pa.Table.from_pydict({ "key": ["aa", "bb", "cc"], "value": [10, 20, 30], })
-
Use of
mainwith a simple table name...with connect() as conn, conn.cursor() as crsr: crsr.adbc_ingest( "main.test_data", data, "create" ) conn.commit()
...now raises:
adbc_driver_manager._lib.InternalError: ADBC_STATUS_INTERNAL (9): [SQLite] Failed to prepare statement: no such table: main.test_data (executed 'INSERT INTO main.test_data VALUES (?, ?)') -
Use of a table name that requires quoting...
with connect() as conn, conn.cursor() as crsr: crsr.adbc_ingest( '"test-data"', data, "create" ) conn.commit()
...now raises:
adbc_driver_manager._lib.InternalError: ADBC_STATUS_INTERNAL (9): [SQLite] Failed to prepare statement: no such table: test-data (executed 'INSERT INTO "test-data" VALUES (?, ?)')
In the previous release (0.5.x) these examples both work correctly, as expected 👍
Footnotes
-
Note that
mainshould always be valid, as it refers to the primary db being connected to (other names can be brought in viaATTACH DATABASE). ↩
Metadata
Metadata
Assignees
Labels
No labels