Incubator-superset: Word cloud chart throws an error with an "in" filter clause specified

Created on 12 Jul 2020  路  3Comments  路  Source: apache/incubator-superset

If you add a filter with an "in" clause to a word cloud chart in Superset 0.37rc1, it throws an error.

Request posted to /api/v1/chart/data:
{"datasource":{"id":21,"type":"table"},"force":false,"queries":[{"extras":{"where":""},"groupby":["app_name"],"is_timeseries":false,"metrics":[{"label":"hits"}],"order_desc":true,"orderby":[],"row_limit":100,"time_range":"Last week","timeseries_limit":0,"timeseries_limit_metric":null,"filters":[{"col":"browser","op":"in","val":["Chrome","Safari"]}],"having":"","having_filters":[],"where":""}],"result_format":"json","result_type":"full"}

Response:
HTTP code 400
{"message":"Request is incorrect: {'queries': {0: {'filters': {0: {'op': ['Must be one of: ==, !=, >, <, >=, <=, LIKE, IS NULL, IS NOT NULL, IN, NOT IN, REGEX.']}}}}}"}

This seems to be a problem with the /api/v1/chart/data endpoint. Charts that post to /superset/explore_json don't have this issue.

How to reproduce the bug

Create a new word cloud chart. Add a filter with an "in" clause, e.g. "Browser" in "Chrome","Safari".
Server sends back a 400 response code.

Environment

(please complete the following information):

  • superset version: 0.37 RC 1
  • python version:3.6.11
  • node.js version: 12.14.1
  • npm version: 6.13.4

Checklist

  • [X] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [X] I have reproduced the issue with at least the latest released version of superset.
  • [X] I have checked the issue tracker for the same issue and I haven't found one similar.
#bug

All 3 comments

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.97. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Thanks for reporting this @bryanck ! A fix is currently under review, and will probably trigger 0.37.0rc2 once merged.

Was this page helpful?
0 / 5 - 0 ratings