kgabryje opened a new pull request #15385:
URL: https://github.com/apache/superset/pull/15385


   ### SUMMARY
   When user selects "Numerical range" native filter, only numeric columns 
should be available to choose. If there are no numeric columns in the dataset, 
show "No columns found" message in select column dropdown. When user has 
selected a non-numeric column and then changes filter type to numerical range, 
the column field should be reset.
   We use `type_generic` field to check column's type. If a column doesn't have 
`type_generic` field, we assume that it's numeric as a failsafe.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
https://user-images.githubusercontent.com/15073128/123410870-15b3d700-d5b0-11eb-8895-99dd308fc558.mov
   
   ### TESTING INSTRUCTIONS
   0. Enable `DASHBOARD_NATIVE_FILTERS` feature flag
   1. Create a native filter and select "Numerical range" filter
   2. Verify that only numeric columns are available to choose from (exception: 
some datasets from test data, like `message_channels`, have columns with 
`type_generic` field unset. In those cases, we display them as a failsafe)
   3. Change filter type to Value and verify that all columns are available, 
not only numeric
   4. Select some non-numeric column and change back to numerical range - 
column field should be reset.
   5. 
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: closes #15226 
   - [ ] 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.

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