diegomedina248 opened a new pull request, #20235:
URL: https://github.com/apache/superset/pull/20235

   ### SUMMARY
   
   When creating a Box Plot Chart, users can set aggregations on the column(s) 
that will be applied on the Metrics field. However, if the Average aggregation 
function is set, the Chart won't load and below error message will be displayed:
   
   `ufunc 'isnan' not supported for the input types, and the inputs could not 
be safely coerced to any supported types according to the casting rule ''safe''`
   
   `This may be triggered by:`
   `Issue 1011 - Superset encountered an unexpected error.`
   
   The issue is that the boxplot post processing function uses, for most of 
their operators, the `nanpercentile` function.
   That function won't work on objects, which is the data type for bigints in 
postgresql.
   By coercing the type to it's numeric form we get rid of that issue.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Before:
   
   
https://user-images.githubusercontent.com/17252075/171517890-f70e7f6b-9644-494e-8ad0-ec4223e8e541.mov
   
   After:
   
   
https://user-images.githubusercontent.com/17252075/171517924-ba17b67a-9fd8-40fd-b979-342f5ff217c3.mov
   
   ### TESTING INSTRUCTIONS
   
   1. Access your Workspace.
   2. Navigate to Charts. 
   3. Click on the + CHART button in the top right corner to create a new Chart.
   4. Choose the Flights Dataset, and the Box Plot Chart.
   5. Click on CREATE NEW CHART button.
   6. Click on the Metrics pop up.
   7. Switch to the SIMPLE tab.
   8. Select the FLIGHT_NUMBER column.
   9. Set the AVG aggregation.
   10. Click on SAVE.
   11. Click on RUN.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to