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/10 08:14:04 UTC

[GitHub] villebro commented on a change in pull request #6847: [WIP] Refactor dataframe and column name mutation logic

villebro commented on a change in pull request #6847: [WIP] Refactor dataframe and column name mutation logic
URL: https://github.com/apache/incubator-superset/pull/6847#discussion_r255327204
 
 

 ##########
 File path: superset/connectors/sqla/models.py
 ##########
 @@ -298,20 +300,14 @@ class SqlaTable(Model, BaseDatasource):
         'MAX': sa.func.MAX,
     }
 
-    def get_label(self, label):
-        """Conditionally mutate a label to conform to db engine requirements
-        and store mapping from mutated label to original label
-
-        :param label: original label
-        :return: Either a string or sqlalchemy.sql.elements.quoted_name if required
-        by db engine
-        """
+    def make_sqla_column_compatible(self, sqla_col, label=None):
+        original_label = label if label else sqla_col.name
 
 Review comment:
   Good point. To align with semantics elsewhere, I changed this to `label_expected`.

----------------------------------------------------------------
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