Skip to content

Data Type Bug Fixes#99

Merged
cgivre merged 3 commits intomasterfrom
type_fixes
Feb 5, 2026
Merged

Data Type Bug Fixes#99
cgivre merged 3 commits intomasterfrom
type_fixes

Conversation

@cgivre
Copy link
Collaborator

@cgivre cgivre commented Feb 5, 2026

This PR addresses multiple bugs and code quality issues across the sqlalchemy-drill codebase.

Bug Fixes

  • URL encoding issue: Fixed malformed USE queries when Superset URL-encodes schema paths (e.g., %2F for /). Added urllib.parse.unquote() to properly decode database paths before
    processing.
  • Data type detection: Fixed issue where all column types were returning as UserDefinedType:
    • Expanded _type_map with additional Drill types: varbinary, numeric, float, float4, real, tinyint, char, character, string, null, struct, array
    • Fixed extraction of type names from DBAPITypeObject.values instead of converting the object to string
    • Improved precision stripping to handle all formats (e.g., varchar(100), decimal(10,2))
  • Splunk schema support: Added Splunk to the list of plugins with dynamic schemas that require querying data directly to retrieve column metadata (similar to MongoDB handling)
  • Streaming results option: Added stream_results connection parameter to allow disabling HTTP streaming, which can work around certain Drill REST API bugs with array columns
  • Removed obsolete imports: Removed references to DefaultCompiler which no longer exists in modern SQLAlchemy versions

@cgivre cgivre self-assigned this Feb 5, 2026
@cgivre cgivre merged commit 01dc623 into master Feb 5, 2026
2 checks passed
@cgivre cgivre deleted the type_fixes branch February 5, 2026 04:50
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.

1 participant