Skip to content

Commit

Permalink
fix: lost renameOperator in mixed timeseries chart (#19802)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhaoyongjie committed Apr 21, 2022
1 parent 1dabebb commit 108a2a4
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@ import {
QueryObject,
normalizeOrderBy,
} from '@superset-ui/core';
import { flattenOperator, pivotOperator } from '@superset-ui/chart-controls';
import {
pivotOperator,
renameOperator,
flattenOperator,
} from '@superset-ui/chart-controls';

export default function buildQuery(formData: QueryFormData) {
const {
Expand Down Expand Up @@ -66,7 +70,11 @@ export default function buildQuery(formData: QueryFormData) {
is_timeseries: true,
post_processing: [
pivotOperator(formData1, { ...baseQueryObject, is_timeseries: true }),
flattenOperator(formData1, { ...baseQueryObject, is_timeseries: true }),
renameOperator(formData1, {
...baseQueryObject,
...{ is_timeseries: true },
}),
flattenOperator(formData1, baseQueryObject),
],
} as QueryObject;
return [normalizeOrderBy(queryObjectA)];
Expand All @@ -78,7 +86,11 @@ export default function buildQuery(formData: QueryFormData) {
is_timeseries: true,
post_processing: [
pivotOperator(formData2, { ...baseQueryObject, is_timeseries: true }),
flattenOperator(formData2, { ...baseQueryObject, is_timeseries: true }),
renameOperator(formData2, {
...baseQueryObject,
...{ is_timeseries: true },
}),
flattenOperator(formData2, baseQueryObject),
],
} as QueryObject;
return [normalizeOrderBy(queryObjectB)];
Expand Down

0 comments on commit 108a2a4

Please sign in to comment.