Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(native-filters): add timegrain and column filter #13484

Merged
merged 10 commits into from Mar 9, 2021

Conversation

villebro
Copy link
Member

@villebro villebro commented Mar 5, 2021

SUMMARY

Changes:

  • Add support for fetch values predicate to QueryObject and SQLA model and apply it to Select and Range filters.
  • Add support for native filters with datasource but no column
  • Add Time column native filter
  • Add Time grain native filter
  • Add fetch values predicate support to Range and Select filter
  • Fix Select filter empty filter option
  • Fix filter indicators for native filters without datasources

Relies on changes to superset-ui/core done in apache-superset/superset-ui#992. Other unrelated superset-ui PRs pulled in by this bump:

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

time-native

TEST PLAN

CI + added tests

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@villebro villebro force-pushed the villebro/native-timegrain branch 6 times, most recently from c0b5464 to 0273f63 Compare March 7, 2021 10:30
@codecov
Copy link

codecov bot commented Mar 7, 2021

Codecov Report

Merging #13484 (bc8b474) into master (9b8e255) will decrease coverage by 0.35%.
The diff coverage is 43.28%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13484      +/-   ##
==========================================
- Coverage   77.16%   76.80%   -0.36%     
==========================================
  Files         917      930      +13     
  Lines       46130    46278     +148     
  Branches     5600     5554      -46     
==========================================
- Hits        35595    35546      -49     
- Misses      10403    10598     +195     
- Partials      132      134       +2     
Flag Coverage Δ
cypress 57.45% <72.13%> (+0.01%) ⬆️
hive ?
javascript 62.49% <13.63%> (-0.32%) ⬇️
mysql 80.46% <89.36%> (+0.04%) ⬆️
postgres 80.50% <89.36%> (+0.04%) ⬆️
presto ?
python 80.58% <89.36%> (-0.38%) ⬇️
sqlite 80.12% <82.97%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...tersConfigModal/FiltersConfigForm/ControlItems.tsx 65.21% <ø> (ø)
...src/filters/components/Range/RangeFilterPlugin.tsx 0.00% <0.00%> (ø)
...rontend/src/filters/components/Range/buildQuery.ts 0.00% <ø> (ø)
...set-frontend/src/filters/components/Range/index.ts 30.00% <ø> (ø)
...ontend/src/filters/components/Select/buildQuery.ts 66.66% <ø> (ø)
...et-frontend/src/filters/components/Select/index.ts 40.00% <ø> (ø)
...d/src/filters/components/Time/TimeFilterPlugin.tsx 0.00% <0.00%> (ø)
...rset-frontend/src/filters/components/Time/index.ts 33.33% <ø> (ø)
...s/components/TimeColumn/TimeColumnFilterPlugin.tsx 0.00% <0.00%> (ø)
...nd/src/filters/components/TimeColumn/buildQuery.ts 0.00% <0.00%> (ø)
... and 52 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9b8e255...01ff146. Read the comment docs.

@villebro villebro force-pushed the villebro/native-timegrain branch 3 times, most recently from 29f7865 to 9b5c5ef Compare March 8, 2021 21:08
@villebro
Copy link
Member Author

villebro commented Mar 8, 2021

For some weird reason the GH API is not listing some files changed in this PR, which is causing CI to skip Python tests: https://api.github.com/repos/apache/superset/pulls/13484/files (looking into what could be the cause of this)

@villebro villebro changed the title [WIP] feat(native-filters): add timegrain and column filter feat(native-filters): add timegrain and column filter Mar 9, 2021
Copy link
Contributor

@simcha90 simcha90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left some comments only for review of Client side

Copy link
Member

@zhaoyongjie zhaoyongjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested in my local environment, LGTM, thanks @villebro

@villebro villebro merged commit 375797f into apache:master Mar 9, 2021
@villebro villebro deleted the villebro/native-timegrain branch March 9, 2021 15:27
@junlincc junlincc added the dashboard:native-filters Related to the native filters of the Dashboard label Mar 12, 2021
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
* feat(native-filters): add timegrain and column filter

* add fetch values predicate

* bump deps

* lint

* fix test

* add python test for legacy merge

* fix default value and isInitialized to not check strict equality

* Address comments

* add FilterValue type

* address review comments
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels dashboard:native-filters Related to the native filters of the Dashboard preset-io 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants