Skip to content

fix(dashboard): filter numeric values correctly #33230

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

suraj-mandal
Copy link

@suraj-mandal suraj-mandal commented Apr 24, 2025

SUMMARY

The following changes have been made:

Upon debugging the models.py file, it was observed that the integer values were not being converted to float, which led to a mismatch among values.

Screenshot of the correct changes after the fix

image

ADDITIONAL INFORMATION

  • Fixes Incorrect filtering for numeric values with different decimal precision #33206
  • Has associated issue:
  • Required feature flags:
  • 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 are tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@dosubot dosubot bot added the dashboard Namespace | Anything related to the Dashboard label Apr 24, 2025
Copy link

@korbit-ai korbit-ai bot left a comment

Choose a reason for hiding this comment

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

Review by Korbit AI

Korbit automatically attempts to detect when you fix issues in new commits.
Category Issue Status
Error Handling Redundant numeric casting fallback ▹ view ✅ Fix detected
Files scanned
File Path Reviewed
superset/connectors/sqla/models.py

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

Copy link
Author

@suraj-mandal suraj-mandal left a comment

Choose a reason for hiding this comment

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

I have made the fix

@suraj-mandal
Copy link
Author

rusackas, I have created the PR that fixes the issue. Can you kindly check and let me know if the checks are successful, since I am not able to test them on my own. Locally I ran the pre-commit hook and it was successful.

Copy link

codecov bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 8.33333% with 11 lines in your changes missing coverage. Please review.

Project coverage is 65.72%. Comparing base (76d897e) to head (3e65daa).
Report is 1791 commits behind head on master.

Files with missing lines Patch % Lines
superset/models/helpers.py 0.00% 6 Missing ⚠️
superset/connectors/sqla/models.py 16.66% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #33230      +/-   ##
==========================================
+ Coverage   60.48%   65.72%   +5.23%     
==========================================
  Files        1931      553    -1378     
  Lines       76236    39935   -36301     
  Branches     8568        0    -8568     
==========================================
- Hits        46114    26248   -19866     
+ Misses      28017    13687   -14330     
+ Partials     2105        0    -2105     
Flag Coverage Δ
hive 48.27% <0.00%> (-0.88%) ⬇️
javascript ?
presto 52.75% <8.33%> (-1.06%) ⬇️
python 65.72% <8.33%> (+2.22%) ⬆️
unit 61.30% <0.00%> (+3.67%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@michael-s-molina
Copy link
Member

Possible duplicate of #33222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dashboard Namespace | Anything related to the Dashboard size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect filtering for numeric values with different decimal precision
2 participants