I feel like all of this is getting pretty messy and I'm starting to think we 
need a higher level refactor. Instead of mutating dataframe columns names, I 
feel like we should target SQLAlchemy labels (aliases) (upstream).

This would mean that everywhere where we create a SQLA label we'd send it 
through a db_engine_spec `normalize_sqla_label` method. This also means that we 
need to also systematically do this every time we access a column in a 
dataframe.

Now for the Druid connector there's no `db_engine_spec` as it's a SQLA 
construct. Maybe BaseViz can register a `self.normalize_label()` that points to 
`db_engine_spec.normalize_sqla_label` for the sqla connector, and points to a 
no-op for the druid connector.

What do you think?

[ Full content available at: 
https://github.com/apache/incubator-superset/pull/5686 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to