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 2020/06/23 02:15:09 UTC

[GitHub] [incubator-superset] ktmud commented on a change in pull request #10113: feat(viz): add query mode switch for table chart

ktmud commented on a change in pull request #10113:
URL: https://github.com/apache/incubator-superset/pull/10113#discussion_r443922651



##########
File path: superset/viz.py
##########
@@ -563,6 +567,46 @@ class TableViz(BaseViz):
     is_timeseries = False
     enforce_numerical_metrics = False
 
+    def process_metrics(self) -> None:
+        """Process form data and store parsed column configs.
+           1. Determine query mode based on form_data params.
+                - Use `query_mode` if it has a valid value
+                - Set as RAW mode if `all_columns` is set
+                - Otherwise defaults to AGG mode
+           2. Determine output columns based on query mode.
+        """
+        super().process_metrics()

Review comment:
       Refactor how data fields are processed for `TableViz`. In general, for all visualizations, we should process all inputs as soon as possible, store the parsed params somewhere, and refer the single source of truth in all future operations.




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



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