feat: add type_generic and is_dttm to table metadata#14863
Conversation
Codecov Report
@@ Coverage Diff @@
## master #14863 +/- ##
==========================================
- Coverage 77.38% 77.35% -0.03%
==========================================
Files 963 965 +2
Lines 49245 49438 +193
Branches 6197 6247 +50
==========================================
+ Hits 38110 38245 +135
- Misses 10934 10992 +58
Partials 201 201
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
| # no Warning level messages displayed, use"--disable=all --enable=classes | ||
| # --disable=W" | ||
| disable=long-builtin,dict-view-method,intern-builtin,suppressed-message,no-absolute-import,unpacking-in-except,apply-builtin,delslice-method,indexing-exception,old-raise-syntax,print-statement,cmp-builtin,reduce-builtin,useless-suppression,coerce-method,input-builtin,cmp-method,raw_input-builtin,nonzero-method,backtick,basestring-builtin,setslice-method,reload-builtin,oct-method,map-builtin-not-iterating,execfile-builtin,old-octal-literal,zip-builtin-not-iterating,buffer-builtin,getslice-method,metaclass-assignment,xrange-builtin,long-suffix,round-builtin,range-builtin-not-iterating,next-method-called,parameter-unpacking,unicode-builtin,unichr-builtin,import-star-module-level,raising-string,filter-builtin-not-iterating,using-cmp-argument,coerce-builtin,file-builtin,old-division,hex-method,missing-docstring,too-many-lines,ungrouped-imports,import-outside-toplevel,raise-missing-from,super-with-arguments,bad-option-value,too-few-public-methods | ||
| disable=long-builtin,dict-view-method,intern-builtin,suppressed-message,no-absolute-import,unpacking-in-except,apply-builtin,delslice-method,indexing-exception,old-raise-syntax,print-statement,cmp-builtin,reduce-builtin,useless-suppression,coerce-method,input-builtin,cmp-method,raw_input-builtin,nonzero-method,backtick,basestring-builtin,setslice-method,reload-builtin,oct-method,map-builtin-not-iterating,execfile-builtin,old-octal-literal,zip-builtin-not-iterating,buffer-builtin,getslice-method,metaclass-assignment,xrange-builtin,long-suffix,round-builtin,range-builtin-not-iterating,next-method-called,parameter-unpacking,unicode-builtin,unichr-builtin,import-star-module-level,raising-string,filter-builtin-not-iterating,using-cmp-argument,coerce-builtin,file-builtin,old-division,hex-method,missing-docstring,too-many-lines,ungrouped-imports,import-outside-toplevel,raise-missing-from,super-with-arguments,bad-option-value,too-few-public-methods,too-many-locals |
There was a problem hiding this comment.
disable too-many-locals lint rule. There are too many ignore in the codebase for this rule.
villebro
left a comment
There was a problem hiding this comment.
Small comment about naming. I also wonder if we should start deprecating the use of is_dttm and start promoting the use of type_generic?
I think in the explore page should return type_generic(derived from type) instead of is_dttm or type. but in the sqllab should return database original column type. |
* upstream/master: (68 commits) fix typos (apache#14950) docs: fix custom oauth config (apache#14997) fix: apply template_params on external_metadata (apache#14996) fix: toggle fullscreen on the dashboard (apache#14979) feat(native-filters): add markers and number formatter + simple tests (apache#14981) fix(native-filters): Fix "undefined" error after editing a filter (apache#14984) fix(native-filters): remove implied fetch predicate (apache#14982) fix(native-filters): update cascaded filter state on change (apache#14980) fix(filter box): replace freeform where clause with ilike (apache#14900) refactor: Convert TableElement.jsx component from class to functional with hooks (apache#14830) fix: renamed sqllab filters to _filters (apache#14971) feat(native-filters): apply cascading without instant filtering (apache#14966) chore: bump superset-ui to 0.17.53 (apache#14968) fix(native-filters): cascading filters not rendering in tab (apache#14964) feat: add type_generic and is_dttm to table metadata (apache#14863) additional safeguard (apache#14953) feat: Adding FORCE_SSL as feature flag in config.py (apache#14934) feat(dashboard/native-filters): Hide filters out of scope of current tab (apache#14933) fix: time parser truncate to first day of year/month (apache#14945) fix: is_temporal should overwrite is_dttm (apache#14894) ...
SUMMARY
For the current the Superset,
is_temporalis used to determine if a column is a DateTime column instead of the column type (Only the columns marked withis_temporalcan be used for time picker). Superset doesn't mark a time column asis_temporalwhen creating a new dataset or syncing an existing dataset.This PR introduce
is_dttmandgeneral_columnfields to the dataset metadata. so that it can be mark a DateTime column withis_temporal.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
update existing columns
update.exist.columns.mp4
add new columns
add.new.columns.mp4
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION