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/01/14 13:05:00 UTC

[GitHub] [superset] kgabryje commented on a change in pull request #18045: feat(advanced analytics): support groupby in resample

kgabryje commented on a change in pull request #18045:
URL: https://github.com/apache/superset/pull/18045#discussion_r784826798



##########
File path: superset-frontend/packages/superset-ui-chart-controls/src/operators/resampleOperator.ts
##########
@@ -28,13 +32,21 @@ export const resampleOperator: PostProcessingFactory<
   const resampleMethod = resampleZeroFill ? 'asfreq' : formData.resample_method;
   const resampleRule = formData.resample_rule;
   if (resampleMethod && resampleRule) {
+    const groupby_columns = ensureIsArray(queryObject.columns).map(column => {
+      if (isPhysicalColumn(column)) {
+        return column;
+      }
+      return column.label;
+    });

Review comment:
       I like the idea, it shouldn't be difficult to implement. Also, what do you think about creating a validator that returns an error when 2 or more columns or metrics have the same label?




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