apache / superset

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

Bug in cross-filter values when click on data from chart type Regular #26114

Open natilehrer opened 9 months ago

natilehrer commented 9 months ago

How to reproduce the bug

Data and Dashboard are from the default when uploading Superset 3.0.0

  1. Go to the Dashboard page "Video Game Sales" (which has chart from Timeseries/Regular for example: Scatter Plot chart)
  2. Go to edit page for the chart "Most Dominant Platforms"
  3. In the edit chart page -> choose chart type: Scatter Plot chart (or another from types: Timeseries -> Regular) and also in the Query section: Metrics- choose 2 metrics and 1 dimension OR 1 metric and 2 dimension. let's choose for this example: metrics: SUM(global_sales), Dimensions: publisher and name.
  4. Save the edited chart and add it again to our dashboard "Video Game Sales"
  5. Press on a data in this chart (select the single value above 2004)
  6. Open the "filter" section from the left side of the UI
  7. look at the string under "cross/filters" -> "Most Dominant Platforms" filter value.

Expected results

on the left side of the page- "filters" , i would expect under "cross-filters" the filter "dimension: value" + "dimension in our example: "Publisher Take-Two Interactive" and another "Name Grand Theft Auto:San Andreas"

Actual results

"Publisher Take-Two InteractiveGrand Theft Auto:San Andreas

The problem is that the metrics+dimensions merged to one big string as a value to a dimension, With this bad string, it will never find other chart's info with this merged values

Screenshots

From the example above: 1 metric + 2 dimensions Edit chart page: type chart, metrics, dimensions edit_chart_properties

The dashboard page with the bug presented: bad cross-filter string, which returns no results in dashboard bad_cross_filter_result

Screenshots - Second scenario: 2 metrics +dimension

edit_chart_properties_scenario2

Expected: name Kinect Adventures! Actual: name SUM(na_sales)Kinect Adventures! bad_cross_filter_result_scenario2

Environment

natilehrer commented 9 months ago

Hi, I hope @sfirke you can find it as a bug and confirm this issue in #cross-filter

rusackas commented 2 months ago

This does seem to still be an issue in current Superset (and Preset). Not sure if @sadpandajoe or @Vitor-Avila have heard any reports of this cropping up, or if @kgabryje has had a chance to look, but can anyone

Vitor-Avila commented 1 month ago

@rusackas this is the first time I'm hearing about this issue - wasn't familiar with it just yet.

kgabryje commented 3 weeks ago

The concatenated string is difficult to read, but the queries generated by filtered charts are correct - seems like it's just a visual issue

image