apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
61.98k stars 13.59k forks source link

fix: Histogram chart not able to use decimal datatype column #30416

Open michael-s-molina opened 21 hours ago

michael-s-molina commented 21 hours ago

SUMMARY

Fixes https://github.com/apache/superset/issues/30301 by making the Histogram chart more resilient when handling non-numeric columns or numeric columns with non-numeric values.

TESTING INSTRUCTIONS

Check the original issue for instructions.

ADDITIONAL INFORMATION

codecov[bot] commented 21 hours ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 70.77%. Comparing base (76d897e) to head (355df1c). Report is 786 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #30416 +/- ## =========================================== + Coverage 60.48% 70.77% +10.28% =========================================== Files 1931 1981 +50 Lines 76236 79797 +3561 Branches 8568 9089 +521 =========================================== + Hits 46114 56478 +10364 + Misses 28017 21097 -6920 - Partials 2105 2222 +117 ``` | [Flag](https://app.codecov.io/gh/apache/superset/pull/30416/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [hive](https://app.codecov.io/gh/apache/superset/pull/30416/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `48.98% <20.00%> (-0.19%)` | :arrow_down: | | [javascript](https://app.codecov.io/gh/apache/superset/pull/30416/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `58.51% <ø> (+0.79%)` | :arrow_up: | | [mysql](https://app.codecov.io/gh/apache/superset/pull/30416/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `76.83% <20.00%> (?)` | | | [postgres](https://app.codecov.io/gh/apache/superset/pull/30416/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `76.93% <20.00%> (?)` | | | [presto](https://app.codecov.io/gh/apache/superset/pull/30416/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `53.48% <20.00%> (-0.33%)` | :arrow_down: | | [python](https://app.codecov.io/gh/apache/superset/pull/30416/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `83.91% <100.00%> (+20.42%)` | :arrow_up: | | [sqlite](https://app.codecov.io/gh/apache/superset/pull/30416/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `76.38% <20.00%> (?)` | | | [unit](https://app.codecov.io/gh/apache/superset/pull/30416/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `60.67% <100.00%> (+3.05%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

michael-s-molina commented 16 hours ago

Does it make sense to raise a warning that non-numeric data has been excluded when records are coerced to NaN?

Good point @fisjac. I changed the logic to let users handle non-numeric values as they might want to fix their datasets or add filters to remove these values.