You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2019/09/05 15:04:44 UTC

[GitHub] [incubator-superset] villebro opened a new pull request #8180: [bugfix] Make orderby native sqla construct

villebro opened a new pull request #8180: [bugfix] Make orderby native sqla construct
URL: https://github.com/apache/incubator-superset/pull/8180
 
 
   ### CATEGORY
   
   Choose one
   
   - [x] Bug Fix
   - [ ] Enhancement (new features, refinement)
   - [ ] Refactor
   - [ ] Add tests
   - [ ] Build / Development Environment
   - [ ] Documentation
   
   ### SUMMARY
   Currently the orderby element is passed as a string when constructing the `Selectable` in `sqla/models.py`. This gets automatically replaced by the corresponding native `ColumnClause` if a column with the same name exists in the `SELECT` columns. However, if the orderable column is not present in the `SELECT`, an exception is thrown. This PR makes the orderable column a native SqlAlchemy construct.
   
   ### TEST PLAN
   Tested locally.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [x] Has associated issue: Closes #8177
   - [ ] Changes UI
   - [ ] Requires DB Migration.
   - [ ] Confirm DB Migration upgrade and downgrade tested.
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   
   ### REVIEWERS
   @squalou @john-bodley @mistercrunch 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org