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/05/31 13:35:28 UTC

[GitHub] [superset] zhaoyongjie commented on a diff in pull request #20194: chore: Removes unused vars

zhaoyongjie commented on code in PR #20194:
URL: https://github.com/apache/superset/pull/20194#discussion_r885645396


##########
superset-frontend/packages/superset-ui-chart-controls/src/operators/flattenOperator.ts:
##########
@@ -19,9 +19,7 @@
 import { PostProcessingFlatten } from '@superset-ui/core';
 import { PostProcessingFactory } from './types';
 
-export const flattenOperator: PostProcessingFactory<PostProcessingFlatten> = (
-  formData,
-  queryObject,
-) => ({
-  operation: 'flatten',
-});

Review Comment:
   The operators in AA are intentionally designed to be a unified interface. These operators may use `formData` or `queryObject` at any time.  



##########
superset-frontend/packages/superset-ui-chart-controls/src/operators/prophetOperator.ts:
##########
@@ -23,24 +23,22 @@ import {
 } from '@superset-ui/core';
 import { PostProcessingFactory } from './types';
 
-export const prophetOperator: PostProcessingFactory<PostProcessingProphet> = (
-  formData,
-  queryObject,
-) => {
-  const index = getColumnLabel(formData.x_axis || DTTM_ALIAS);

Review Comment:
   same before



##########
superset-frontend/packages/superset-ui-chart-controls/src/operators/resampleOperator.ts:
##########
@@ -20,22 +20,22 @@
 import { PostProcessingResample } from '@superset-ui/core';
 import { PostProcessingFactory } from './types';
 
-export const resampleOperator: PostProcessingFactory<PostProcessingResample> = (
-  formData,
-  queryObject,
-) => {
-  const resampleZeroFill = formData.resample_method === 'zerofill';
-  const resampleMethod = resampleZeroFill ? 'asfreq' : formData.resample_method;

Review Comment:
   same before.



##########
superset-frontend/packages/superset-ui-chart-controls/src/operators/contributionOperator.ts:
##########
@@ -20,7 +20,7 @@ import { PostProcessingContribution } from '@superset-ui/core';
 import { PostProcessingFactory } from './types';
 
 export const contributionOperator: PostProcessingFactory<PostProcessingContribution> =
-  (formData, queryObject) => {
+  formData => {

Review Comment:
   same before



##########
superset-frontend/packages/superset-ui-chart-controls/src/operators/prophetOperator.ts:
##########
@@ -23,24 +23,22 @@ import {
 } from '@superset-ui/core';
 import { PostProcessingFactory } from './types';
 
-export const prophetOperator: PostProcessingFactory<PostProcessingProphet> = (
-  formData,
-  queryObject,
-) => {
-  const index = getColumnLabel(formData.x_axis || DTTM_ALIAS);

Review Comment:
   same before



##########
superset-frontend/packages/superset-ui-chart-controls/src/operators/resampleOperator.ts:
##########
@@ -20,22 +20,22 @@
 import { PostProcessingResample } from '@superset-ui/core';
 import { PostProcessingFactory } from './types';
 
-export const resampleOperator: PostProcessingFactory<PostProcessingResample> = (
-  formData,
-  queryObject,
-) => {
-  const resampleZeroFill = formData.resample_method === 'zerofill';
-  const resampleMethod = resampleZeroFill ? 'asfreq' : formData.resample_method;

Review Comment:
   same before.



##########
superset-frontend/packages/superset-ui-chart-controls/src/operators/flattenOperator.ts:
##########
@@ -19,9 +19,7 @@
 import { PostProcessingFlatten } from '@superset-ui/core';
 import { PostProcessingFactory } from './types';
 
-export const flattenOperator: PostProcessingFactory<PostProcessingFlatten> = (
-  formData,
-  queryObject,
-) => ({
-  operation: 'flatten',
-});

Review Comment:
   The operators in AA are intentionally designed to be a unified interface. These operators may use `formData` or `queryObject` at any time.  



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