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

fix(explore): pass partitionColumn when creating new adhoc filter #12789

Merged
merged 4 commits into from
Jan 27, 2021

Conversation

villebro
Copy link
Member

@villebro villebro commented Jan 27, 2021

SUMMARY

The prop partitionColumn was not being passed to AdhocFilterPopoverTrigger in addNewFilterPopoverTrigger of AdhocFilterControl, causing the latest partition operator to be missing for datasources that support it. The override of valueRender seemed to be a leftover from some old time, so it was removed and partitionColumn added to the original valueRenderer that's created in the constructor. In addition, the operator dropdown showed irrelevant operators, causing the operator count to be inflated. Also fixed a typo ("operators(s)" to "operator(s)") along with relevant translations.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before: Partition operator is missing from dropdown. Also notice how the dropdown shows 13 operators, despite only 11 being visible:
before

After
Partition operator pops up if column supports it. The placeholder is also updated to reflect the new operator count after the column has been selected:
after

TEST PLAN

ADDITIONAL INFORMATION

@kgabryje
Copy link
Member

1 nit, other than that LGTM 👍

@codecov-io
Copy link

codecov-io commented Jan 27, 2021

Codecov Report

Merging #12789 (36857a1) into master (7acbb3c) will decrease coverage by 0.20%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #12789      +/-   ##
==========================================
- Coverage   67.00%   66.79%   -0.21%     
==========================================
  Files        1022     1022              
  Lines       50049    50047       -2     
  Branches     4914     5047     +133     
==========================================
- Hits        33533    33429     -104     
- Misses      16392    16494     +102     
  Partials      124      124              
Flag Coverage Δ
cypress 50.89% <0.00%> (+0.04%) ⬆️
javascript 61.69% <50.00%> (+0.01%) ⬆️
python 63.74% <ø> (-0.36%) ⬇️

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

Impacted Files Coverage Δ
...ents/controls/FilterControl/AdhocFilterControl.jsx 63.63% <0.00%> (+1.41%) ⬆️
...Control/AdhocFilterEditPopoverSimpleTabContent.jsx 79.13% <100.00%> (+0.15%) ⬆️
superset/db_engines/hive.py 0.00% <0.00%> (-85.72%) ⬇️
superset/db_engine_specs/hive.py 73.84% <0.00%> (-17.31%) ⬇️
superset/db_engine_specs/presto.py 81.38% <0.00%> (-7.15%) ⬇️
superset/views/database/mixins.py 80.70% <0.00%> (-1.76%) ⬇️
superset/models/core.py 88.04% <0.00%> (-0.82%) ⬇️
...ontend/src/dashboard/components/dnd/handleHover.js 100.00% <0.00%> (+12.50%) ⬆️

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 7acbb3c...36857a1. Read the comment docs.

@pull-request-size pull-request-size bot added size/M and removed size/S labels Jan 27, 2021
Copy link
Member

@ktmud ktmud left a comment

Choose a reason for hiding this comment

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

lgtm

@kgabryje
Copy link
Member

LGTM

@villebro villebro merged commit 997befc into apache:master Jan 27, 2021
@villebro villebro deleted the villebro/fix-partition branch January 27, 2021 17:42
villebro added a commit that referenced this pull request Jan 29, 2021
…2789)

* fix(explore): pass partitionColumn when creating new adhoc filter

* add default value to state

* remove duplicated code

* update translations
@mistercrunch mistercrunch added 🍒 1.0.1 🏷️ 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 preset-io size/M v1.0.1 🍒 1.0.1 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[explore][adhoc filter] "use latest_partition" operator disappeared
5 participants