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(filter box): replace freeform where clause with ilike #14900

Merged
merged 1 commit into from
Jun 4, 2021

Conversation

villebro
Copy link
Member

@villebro villebro commented May 28, 2021

SUMMARY

This is a backport of #14710 to Filter Box to make the Filter Box less error prone and also be able to use database specific case insensitive LIKEs by utilizing the ILIKE SqlAlchemy operator.

BEFORE

Previously special characters broke the filter box Search All Options feature. In the example below, we are trying to search for the string ' 12 in the options, which should be found:
image

AFTER

Now the special characters are handled properly by SqlAlchemy, and the respective row is found:
image

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented May 28, 2021

Codecov Report

Merging #14900 (6271a17) into master (8519a09) will decrease coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #14900      +/-   ##
==========================================
- Coverage   77.52%   77.50%   -0.03%     
==========================================
  Files         963      963              
  Lines       49284    49306      +22     
  Branches     6216     6226      +10     
==========================================
+ Hits        38209    38216       +7     
- Misses      10874    10889      +15     
  Partials      201      201              
Flag Coverage Δ
javascript 72.39% <ø> (-0.04%) ⬇️

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

Impacted Files Coverage Δ
...rontend/src/visualizations/FilterBox/FilterBox.jsx 56.60% <ø> (ø)
...d/src/dashboard/components/gridComponents/Tabs.jsx 76.31% <0.00%> (-11.06%) ⬇️
...nd/src/dashboard/containers/DashboardComponent.jsx 84.84% <0.00%> (ø)
...nd/src/dashboard/components/gridComponents/Tab.jsx 86.20% <0.00%> (+0.75%) ⬆️

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 8519a09...6271a17. Read the comment docs.

@junlincc junlincc added the viz:charts:filterbox Related to the Filterbox viz type label May 28, 2021
Copy link
Member

@geido geido left a comment

Choose a reason for hiding this comment

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

LGTM!

@villebro villebro merged commit 20b86f8 into apache:master Jun 4, 2021
amitmiran137 pushed a commit to nielsen-oss/superset that referenced this pull request Jun 6, 2021
* 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)
  ...
cccs-RyanS pushed a commit to CybercentreCanada/superset that referenced this pull request Dec 17, 2021
QAlexBall pushed a commit to QAlexBall/superset that referenced this pull request Dec 29, 2021
cccs-rc pushed a commit to CybercentreCanada/superset that referenced this pull request Mar 6, 2024
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.3.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/XS viz:charts:filterbox Related to the Filterbox viz type 🚢 1.3.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants