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/02/09 14:46:05 UTC

[GitHub] villebro opened a new pull request #6847: [WIP] Refactor dataframe and column name mutation logic

villebro opened a new pull request #6847: [WIP] Refactor dataframe and column name mutation logic
URL: https://github.com/apache/incubator-superset/pull/6847
 
 
   Several small refactors, features and fixes related to SQLAlchemy engines:
   - Add flag to disable aliases in `db_engine_specs`. By default engines support aliases; this is only disabled on Pinot for now. If the engine doesn't support aliases, labels aren't added to columns (see screenshot below).
   - Move dataframe logic back to `connectors/sqla/models.py` from `db_engine_specs.py` and merge it with the column renaming logic from before.
   - Add `max_column_name_length` property to `db_engine_specs`, and default to MD5 hash if column name is exceeded. Add max lengths to engines that were easy to find by googling.
   - Fix a few linting errors in `db_engine_specs`.
   
   # Example
   
   When creating a chart on Pinot where `COUNT(*)` is calculated grouping by `playerID`, the result shows up like before:
   
   <img width="1262" alt="screenshot 2019-02-09 at 16 09 37" src="https://user-images.githubusercontent.com/33317356/52521935-a1e72d00-2c87-11e9-8461-2b6d6240a43f.png">
   
   Looking at the query, the alias is gone, making it regular PQL:
   
   <img width="897" alt="screenshot 2019-02-09 at 16 09 25" src="https://user-images.githubusercontent.com/33317356/52521966-01453d00-2c88-11e9-8708-6071ed861240.png">
   
   FYI @agrawaldevesh please check this and give comments when you have the time. I tested this with your fork of `pinot_dbapi` (I assume that's the one you are using for now).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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