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

box plots displaying <NULL> as series/category on x-axis #16985

Closed
xiaoyi-dou opened this issue Oct 5, 2021 · 7 comments · Fixed by apache-superset/superset-ui#1448
Closed
Labels
validation:required A committer should validate the issue

Comments

@xiaoyi-dou
Copy link

xiaoyi-dou commented Oct 5, 2021

How to reproduce the bug

  1. Setup using Docker installation, go to any example box plot (Degrees vs Income or Box Plot)

Screenshots

image

It's supposed to look like this (using hosted preset):

image

Environment

(please complete the following information):

  • browser type and version: Chrome 91.0.4472.164
  • superset version: apache/superset:latest-dev Docker image as of Oct. 12, 2021 (not sure what exact version it is, I only see 0.0.0dev in browser)

Checklist

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

  • [ 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.

Additional context

Followed setup instructions as documented here: https://superset.apache.org/docs/installation/installing-superset-using-docker-compose/. Running docker-compose -f docker-compose-non-dev.yml up brought up everything, and was working very smoothly for the most part. Unfortunately ran into this issue with box plots, which is kind of a showstopper.

@xiaoyi-dou xiaoyi-dou added the #bug Bug report label Oct 5, 2021
@xiaoyi-dou xiaoyi-dou changed the title box plot series displaying <NULL> as series/category on x-axis box plots displaying <NULL> as series/category on x-axis Oct 5, 2021
@junlincc
Copy link
Member

junlincc commented Oct 6, 2021

Did we make changes on the sample data? @betodealmeida ?

@junlincc junlincc added validation:required A committer should validate the issue and removed #bug Bug report labels Oct 6, 2021
@xiaoyi-dou
Copy link
Author

the sample data looks fine. spot checked it against the working dataset, and they looked the same as far as I could tell...

image

@konfiot
Copy link

konfiot commented Oct 7, 2021

Same issue, also docker install, on both example datasets (wb_health_population) and our datasets
The SQL Command seems fine, it outputs the correct results in SQL Lab
No errors seem to pop up either in the docker logs output or in the console output in the web client

@xiaoyi-dou
Copy link
Author

In case anyone needs a workaround: building from scratch (https://superset.apache.org/docs/installation/installing-superset-from-scratch) (v1.3.1) generates working box plots.

@konfiot
Copy link

konfiot commented Oct 13, 2021

Any news ? Rebuilding from scratch is not really an option for us

@konfiot
Copy link

konfiot commented Oct 25, 2021

Hi, it's still happening with the latest release, a few informations : let's use the "Degrees vs Income" box plot of the "FCC 2018 Survey" Dataset :
image
In the "View results" row, I have only one row, here it is :

23491.24560914413	10000	82500		2500	35000	3587	150000,100000,150000,180000,120000,100000,91000,90000,85000,110000,95000,100000,100000,115000,150000,100000,95000,100000,100000,100000,100000,100000,124000,185000,92000,100000,130000,200000,100000,100000,90000,200000,120000,90000,110000,85000,130000,100000,85000,100000,150000,120000,143000,100000,85000,140000,90000,140000,145000,178000,115000,125000,137000,95000,105000,120000,100000,105000,108000,100000,120000,120000,114000,140000,110000,90000,130000,165000,115000,150000,100000,120000,120000,95000,85000,90000,98000,150000,140000,200000,90000,140000,100000,122000,100000,105000,90000,90000,150000,100000,130000,90000,85000,120000,108000,120000,115000,150000,100000,110000,110000,105000,95000,90000,90000,84000,90000,100000,130000,90000,90000,100000,96000,130000,110000,200000,200000,98000,100000,140000,85000,200000,84000,90000,125000,85000,100000,95000,100000,110000,200000,118301,175000,190000,85000,84000,96000,85000,139000,107000,130000,96000,90000,89000,105000,120000,95000,110000,87000,90000,105000,150000,140000,100000,144000,138000,100000,95000,150000,200000,110000,160000,100000,105000,115000,140000,103000,109000,100000,90000,115000,95000,95000,104000,112000,100000,200000,107000,90000,100000,100000,100000,95000,103000,115000,130000,120000,100000,100000,120000,120000,90000,100000,100000,103000,103000,150000,90000,95000,140000,100000,90000,120000,85000

Is this normal ? I'm thinking that I should have one result row per series, but I can't check with a working release
If I run the request again, I have the following AJAX Request to /api/v1/chart/data?form_data={"slice_id":95}

{
   "datasource":{
      "id":17,
      "type":"table"
   },
   "force":false,
   "queries":[
      {
         "time_range":"No filter",
         "granularity":"time_start",
         "filters":[
            {
               "col":"is_software_dev",
               "op":"==",
               "val":"1"
            },
            {
               "col":"last_yr_income",
               "op":"<=",
               "val":"200000"
            }
         ],
         "extras":{
            "time_grain_sqla":null,
            "time_range_endpoints":[
               "inclusive",
               "exclusive"
            ],
            "having":"",
            "having_druid":[
               
            ],
            "where":""
         },
         "applied_time_extras":{
            
         },
         "columns":[
            "time_start",
            "school_degree"
         ],
         "metrics":[
            {
               "aggregate":"SUM",
               "column":{
                  "column_name":"last_yr_income",
                  "description":null,
                  "expression":null,
                  "filterable":true,
                  "groupby":true,
                  "id":1589,
                  "is_dttm":false,
                  "python_date_format":null,
                  "type":"DOUBLE PRECISION",
                  "verbose_name":null
               },
               "expressionType":"SIMPLE",
               "hasCustomLabel":false,
               "isNew":false,
               "label":"SUM(last_yr_income)",
               "optionName":"metric_bgqj8nnvz8k_07w8bbh1bc6q",
               "sqlExpression":null
            }
         ],
         "annotation_layers":[
            
         ],
         "series_columns":[
            "school_degree"
         ],
         "timeseries_limit":0,
         "order_desc":true,
         "url_params":{
            
         },
         "custom_params":{
            
         },
         "custom_form_data":{
            
         },
         "post_processing":[
            {
               "operation":"boxplot",
               "options":{
                  "whisker_type":"tukey",
                  "groupby":[
                     
                  ],
                  "metrics":[
                     "SUM(last_yr_income)"
                  ]
               }
            }
         ]
      }
   ],
   "result_format":"json",
   "result_type":"full"
}

With the following answer :

{
   "result":[
      {
         "cache_key":"307e67856c43f540efe1f63fb7f49760",
         "cached_dttm":null,
         "cache_timeout":86400,
         "applied_template_filters":[
            
         ],
         "annotation_data":{
            
         },
         "error":null,
         "is_cached":null,
         "query":"SELECT time_start AS time_start,\n       school_degree AS school_degree,\n       sum(last_yr_income) AS \"SUM(last_yr_income)\"\nFROM \"FCC 2018 Survey\"\nWHERE is_software_dev = 1\n  AND last_yr_income <= 200000\nGROUP BY time_start,\n         school_degree\nLIMIT 50000;\n\n",
         "status":"success",
         "stacktrace":null,
         "rowcount":1,
         "colnames":[
            "SUM(last_yr_income)__mean",
            "SUM(last_yr_income)__median",
            "SUM(last_yr_income)__max",
            "SUM(last_yr_income)__min",
            "SUM(last_yr_income)__q1",
            "SUM(last_yr_income)__q3",
            "SUM(last_yr_income)__count",
            "SUM(last_yr_income)__outliers"
         ],
         "indexnames":[
            0
         ],
         "coltypes":[
            0,
            0,
            0,
            0,
            0,
            0,
            0,
            1
         ],
         "data":[
            {
               "SUM(last_yr_income)__mean":23491.24560914413,
               "SUM(last_yr_income)__median":10000.0,
               "SUM(last_yr_income)__max":82500.0,
               "SUM(last_yr_income)__min":0.0,
               "SUM(last_yr_income)__q1":2500.0,
               "SUM(last_yr_income)__q3":35000.0,
               "SUM(last_yr_income)__count":3587.0,
               "SUM(last_yr_income)__outliers":[
                  150000.0,
                  100000.0,
                  150000.0,
                  180000.0,
                  120000.0,
                  100000.0,
                  91000.0,
                  90000.0,
                  85000.0,
                  110000.0,
                  95000.0,
                  100000.0,
                  100000.0,
                  115000.0,
                  150000.0,
                  100000.0,
                  95000.0,
                  100000.0,
                  100000.0,
                  100000.0,
                  100000.0,
                  100000.0,
                  124000.0,
                  185000.0,
                  92000.0,
                  100000.0,
                  130000.0,
                  200000.0,
                  100000.0,
                  100000.0,
                  90000.0,
                  200000.0,
                  120000.0,
                  90000.0,
                  110000.0,
                  85000.0,
                  130000.0,
                  100000.0,
                  85000.0,
                  100000.0,
                  150000.0,
                  120000.0,
                  143000.0,
                  100000.0,
                  85000.0,
                  140000.0,
                  90000.0,
                  140000.0,
                  145000.0,
                  178000.0,
                  115000.0,
                  125000.0,
                  137000.0,
                  95000.0,
                  105000.0,
                  120000.0,
                  100000.0,
                  105000.0,
                  108000.0,
                  100000.0,
                  120000.0,
                  120000.0,
                  114000.0,
                  140000.0,
                  110000.0,
                  90000.0,
                  130000.0,
                  165000.0,
                  115000.0,
                  150000.0,
                  100000.0,
                  120000.0,
                  120000.0,
                  95000.0,
                  85000.0,
                  90000.0,
                  98000.0,
                  150000.0,
                  140000.0,
                  200000.0,
                  90000.0,
                  140000.0,
                  100000.0,
                  122000.0,
                  100000.0,
                  105000.0,
                  90000.0,
                  90000.0,
                  150000.0,
                  100000.0,
                  130000.0,
                  90000.0,
                  85000.0,
                  120000.0,
                  108000.0,
                  120000.0,
                  115000.0,
                  150000.0,
                  100000.0,
                  110000.0,
                  110000.0,
                  105000.0,
                  95000.0,
                  90000.0,
                  90000.0,
                  84000.0,
                  90000.0,
                  100000.0,
                  130000.0,
                  90000.0,
                  90000.0,
                  100000.0,
                  96000.0,
                  130000.0,
                  110000.0,
                  200000.0,
                  200000.0,
                  98000.0,
                  100000.0,
                  140000.0,
                  85000.0,
                  200000.0,
                  84000.0,
                  90000.0,
                  125000.0,
                  85000.0,
                  100000.0,
                  95000.0,
                  100000.0,
                  110000.0,
                  200000.0,
                  118301.0,
                  175000.0,
                  190000.0,
                  85000.0,
                  84000.0,
                  96000.0,
                  85000.0,
                  139000.0,
                  107000.0,
                  130000.0,
                  96000.0,
                  90000.0,
                  89000.0,
                  105000.0,
                  120000.0,
                  95000.0,
                  110000.0,
                  87000.0,
                  90000.0,
                  105000.0,
                  150000.0,
                  140000.0,
                  100000.0,
                  144000.0,
                  138000.0,
                  100000.0,
                  95000.0,
                  150000.0,
                  200000.0,
                  110000.0,
                  160000.0,
                  100000.0,
                  105000.0,
                  115000.0,
                  140000.0,
                  103000.0,
                  109000.0,
                  100000.0,
                  90000.0,
                  115000.0,
                  95000.0,
                  95000.0,
                  104000.0,
                  112000.0,
                  100000.0,
                  200000.0,
                  107000.0,
                  90000.0,
                  100000.0,
                  100000.0,
                  100000.0,
                  95000.0,
                  103000.0,
                  115000.0,
                  130000.0,
                  120000.0,
                  100000.0,
                  100000.0,
                  120000.0,
                  120000.0,
                  90000.0,
                  100000.0,
                  100000.0,
                  103000.0,
                  103000.0,
                  150000.0,
                  90000.0,
                  95000.0,
                  140000.0,
                  100000.0,
                  90000.0,
                  120000.0,
                  85000.0
               ]
            }
         ],
         "result_format":"json",
         "applied_filters":[
            {
               "column":"is_software_dev"
            },
            {
               "column":"last_yr_income"
            }
         ],
         "rejected_filters":[
            
         ]
      }
   ]
}

Again, no mention of the different series, so I'm thinking this is a backend problem ? Also the "groupby" variable in the request is empty so maybe the client is not setting it right ?

Any other troubleshooting steps I can follow ?

@konfiot
Copy link

konfiot commented Nov 4, 2021

Will try next week, thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validation:required A committer should validate the issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants