Repository navigation
Conversation
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #45496 +/- ##
==========================================
+ Coverage 84.63% 84.65% +0.02%
==========================================
Files 3069 3069
Lines 205446 205679 +233
Branches 48306 48338 +32
==========================================
+ Hits 173879 174122 +243
+ Misses 28277 28265 -12
- Partials 3290 3292 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Clean and minimal, mirrors the existing SMALLINT pattern exactly. Mapping TINYINT to SmallInteger is the right call since SQLAlchemy has no dedicated tiny-int generic type. CI failure is the same stale-master semantic-layer breakage as several other PRs today (semantic_view.implementation = ... AttributeError), unrelated to this change. LGTM.
27d299d to
a18c40e
Compare
a18c40e to
10b7058
Compare
|
@hainenber I updated the unit test now so it's no longer failing :) Please let me know if there's anything else I need to do for this PR, thanks!! |
SUMMARY
BaseEngineSpec._default_column_type_mappingsmapsSMALLINT,INT/INTEGERandBIGINTtoGenericDataType.NUMERIC, but has no entry forTINYINT. Engines that rely on the default mappings, such as Amazon Athena, therefore reportTINYINTcolumns withtype_generic: null.With no generic type, filters on these columns are treated as strings and the value is sent quoted. Strictly typed engines reject the query:
TYPE_MISMATCH: Cannot apply operator: tinyint <= varchar(1)
This PR adds a
^tinyintentry right after^smallint, mapped totypes.SmallInteger()/GenericDataType.NUMERIC.SmallIntegeris the narrowest integer type SQLAlchemy provides generically, so it holds the fullTINYINTrange.Presto and Trino already map
tinyintin their own specs, so they aren't affected. Engines that override this mapping keep their own behavior.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Filtering a
TINYINTcolumnflagwithflag >= 2:Before
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION