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

[GENERIC_CHART_AXES] Custom SQL for x-axis is broken #19974

Closed
3 tasks done
rumbin opened this issue May 6, 2022 · 1 comment · Fixed by #20055
Closed
3 tasks done

[GENERIC_CHART_AXES] Custom SQL for x-axis is broken #19974

rumbin opened this issue May 6, 2022 · 1 comment · Fixed by #20055
Labels
#bug Bug report v1.5

Comments

@rumbin
Copy link
Contributor

rumbin commented May 6, 2022

Having GENERIC_CHART_AXES enabled, the x-Axis control works as expected when using existing columns ("simple") and calculated columns ("saved"). However, when using "custom sql" Superset claims that 0 rows were returned, which is not true.

How to reproduce the bug

  1. Enable the GENERIC_CHART_AXES feature flag
  2. Create a new chart of type Scatter Plot
  3. Choose any metric to be shown on the y-axis
  4. Define some custom SQL for the x-axis; this could be as simple as an existing column name written in parentheses or with added whitespace or so
  5. Run the query
  6. Realize that no data is shown in the chart
  7. Go to the hamburger menu and select Run in SQLLab
  8. Notice that in SQLLab there actually are rows returned from this query

Expected results

The scatter plot shows all returned rows/records.

Actual results

The scatter plot is empty, claiming that no rows were returned by the query.

Screenshots

xy_custom_sql

Environment

(please complete the following information):

  • browser type and version: Chrome 100.0.4896.127 (Official Build) (64-bit)
  • superset version: 1.5 official docker image
  • feature flags:
"THUMBNAILS": True,
"THUMBNAILS_SQLA_LISTENERS": True,
"SQLLAB_BACKEND_PERSISTENCE": True,
"ENABLE_TEMPLATE_PROCESSING": True,
"DASHBOARD_CROSS_FILTERS": True,
"ALERT_REPORTS": True,
"ALERTS_ATTACH_REPORTS": True,
"DASHBOARD_NATIVE_FILTERS": True,
"GENERIC_CHART_AXES": True,
"ENABLE_EXPLORE_DRAG_AND_DROP": True,
"ENABLE_DND_WITH_CLICK_UX": True,
"DASHBOARD_NATIVE_FILTERS_SET": True

Checklist

Make sure to follow these steps before submitting your issue - thank you!

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.
@rumbin rumbin added the #bug Bug report label May 6, 2022
@villebro villebro added the v1.5 label May 13, 2022
@villebro
Copy link
Member

Thanks for reporting @rumbin - let me take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report v1.5
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants