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/12/04 23:27:48 UTC

[GitHub] [incubator-superset] betodealmeida commented on a change in pull request #8658: fix: handle duplicate groupby keys

betodealmeida commented on a change in pull request #8658: fix: handle duplicate groupby keys
URL: https://github.com/apache/incubator-superset/pull/8658#discussion_r354040345
 
 

 ##########
 File path: superset/connectors/sqla/models.py
 ##########
 @@ -731,6 +731,9 @@ def get_sqla_query(  # sqla
         groupby_exprs_sans_timestamp: OrderedDict = OrderedDict()
 
         if groupby:
+            # dedup columns while preserving order
+            groupby = list(dict.fromkeys(groupby))
 
 Review comment:
   I'm confused, if `groupby` is a dict how can it have duplicate keys?

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