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 2022/02/03 09:11:08 UTC

[GitHub] [superset] villebro commented on a change in pull request #17379: feat(explore): adhoc column expressions [ID-3]

villebro commented on a change in pull request #17379:
URL: https://github.com/apache/superset/pull/17379#discussion_r798355557



##########
File path: superset/viz.py
##########
@@ -303,19 +308,30 @@ def process_query_filters(self) -> None:
         merge_extra_filters(self.form_data)
         utils.split_adhoc_filters_into_base_filters(self.form_data)
 
+    @staticmethod
+    def dedup_columns(*columns_args: Optional[List[Column]]) -> List[Column]:
+        # dedup groupby and columns while preserving order
+        labels: List[str] = []
+        deduped_columns: List[Column] = []
+        for columns in columns_args:
+            for column in columns or []:
+                label = get_column_name(column)
+                if label not in labels:
+                    deduped_columns.append(column)

Review comment:
       @mayurnewase do you have repro steps for this error?




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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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