Skip to content

Commit

Permalink
fix: lost renameOperator in mixed timeseries chart (#19802)
Browse files Browse the repository at this point in the history
(cherry picked from commit 108a2a4)
  • Loading branch information
zhaoyongjie authored and villebro committed Apr 25, 2022
1 parent 5567828 commit 4fa96d3
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 4fa96d3

Please sign in to comment.