- Compile schema-less tables without an empty
FROMtarget or a leading dot. - Render column references without a schema qualifier. Drill accepts only a
one-part table qualifier, so every
SELECTagainst a schema-qualified table previously failed withVALIDATION ERROR: Table '<plugin>' not found. - Execute reflection statements through SQLAlchemy executable objects on SQLAlchemy 2, binding metadata values and quoting qualified Drill identifiers.
- Preserve bare-plugin/workspace lookup while binding literal metadata values and escaping LIKE wildcard characters instead of interpolating substring SQL.
- Escape REST DB-API qmark parameters once, ignoring question marks in SQL
literals, identifiers and comments (including
/*/), and never reinterpreting question marks introduced by parameter values. - Preserve opaque DBAPI failures during dynamic column reflection and classpath existence probes: a failed SELECT is not proof that a table is absent.
- Define native
import_dbapi()hooks directly on JDBC and ODBC dialects, retainingdbapi()compatibility aliases and avoiding SQLAlchemy's deprecated legacy-hook fallback. REST already provides its native hook.
DrillIdentifierPreparer.format_drill_table()now takes the schema and table name as separate arguments. The oldformat_drill_table(path, isFile=...)signature is no longer supported and raisesTypeError. Useformat_drill_schema()to format a schema on its own.get_columns()no longer interprets atable_namecontainingSELECTas a subquery to reflect. Reflection now always treats the argument as an identifier. Callers that relied on passing a query must issue it directly.- Non-file column reflection reads
INFORMATION_SCHEMA.COLUMNSinstead ofDESCRIBE, and now reports anullableflag. - A
?inside a quoted identifier is no longer substituted as a parameter, socur.execute("... `a?b` ...", params)must no longer count it. - The REST DB-API rejects parameters Drill cannot represent as literals
(binary, non-finite floats and decimals, complex numbers, and time-zone-aware
datetimes and times) instead of sending SQL that always fails, and rejects
str/bytesas parameter sequences. requires SQLAlchemy >= 1.4, because reflection uses the 1.4Connectionexecution API.
- The REST driver does not verify TLS certificates by default.
verify_ssldefaults toFalse, souse_ssl=Truealone encrypts without authenticating the server. Passverify_ssl=Truefor a trusted connection. This is long-standing behaviour and is unchanged here; changing the default is a separate breaking change. - JDBC and ODBC still inherit
driver == "rest"from the base dialect. That is wrong for both transports, but correcting public dialect metadata is a visible API change that deserves its own review rather than riding along with this fix. Nothing in this package dispatches ondriver, and it is not a TLS control: JDBC and ODBC transport security is configured through their own connection strings. - The JDBC and ODBC dialects are not covered by the automated tests here.
Their
import_dbapi()hooks are verified with stub modules; no live JDBC or ODBC server has been exercised. Treat those transports as unverified. - Verified against Apache Drill 1.21.2 (pinned by image digest) over REST, and against SQLAlchemy 1.4.54, 2.0.52 and the 2.1 prerelease series. SQLAlchemy 2.1 support is based on a prerelease and may change before its final release.
- No new Drill type mappings are claimed. In particular,
STRUCTandARRAYreflection remainsUserDefinedTypeuntil round-trip behavior is verified; that placeholder cannot currently be rendered by the type compiler.
- Parsing of empty result set data in sadrill.
- Added a DB-API compliance test suite running against a local Drill using testcontainers.
- Fix a leaked StopIteration from a generator in sadrill.
- Add 'properties' as a reserved word.
- Fixed type casting bug which caused queries that returned null date or time values to raise an error in _drilldbapi.py.
- Add an impersonation_target parm to drill+sadrill URLs. When present, this parameter will be converted to a userName property in POSTs made to /query.json.
- Backwards compatibility with Drill < 1.19, limited to returning all data values as strings. Users not able to upgrade to >= 1.19 must implement their own typecasting or use sqlalchemy-drill 0.3.
N.B.: The drill+sadrill dialect in this release is not compatible with Drill < 1.19.
- Rewrite the drill+sadrill dialect using the ijson streaming parser.