You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "gkneighb (via GitHub)" <gi...@apache.org> on 2026/07/24 03:13:46 UTC
[PR] feat(waterfall): custom sort for X-axis categories [superset]
gkneighb opened a new pull request, #42372:
URL: https://github.com/apache/superset/pull/42372
### SUMMARY
The Waterfall chart hard-coded its category ordering in `buildQuery`:
```ts
orderby: columns?.map(column => [column, true]) // ORDER BY x_axis ASC
```
So categories always came back **alphabetically by the x-axis value**, and there was **no sort control** in the panel. A narrative movement order — e.g. _Previous → New business → Expansion → Churn → Current_ — was impossible.
This adds two controls to the Query section:
- **Sort by** — a column/metric picker offering any dataset column **or** the metric. Picking a dedicated sort column (e.g. an integer `sort_order` that is 1:1 with the category) yields true custom categorical order — the idiomatic Superset way to reproduce a Tableau-style manual sort.
- **Sort ascending** — direction toggle, shown only when a sort field is chosen.
Ordering is applied at the **query level** (via `ORDER BY`), which is important because the waterfall's cumulative running total is computed in row order. A chosen sort column that isn't already selected is auto-added to the query so `ORDER BY` can reference it, and the x-axis/breakdown columns are kept as secondary sort keys so each category's rows stay contiguous. When **no** sort is set, the query is byte-identical to before — existing charts are unchanged.
**Note:** sorting by a *category-level* column gives an exact custom order (the recommended pattern). Sorting by the *metric* while a breakdown is present orders at the row level, so category placement follows first appearance — defined behavior, but a dedicated sort column is the intended approach.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
_N/A — new control-panel options; with no sort selected, output is unchanged. See testing instructions to verify custom ordering._
### TESTING INSTRUCTIONS
1. Open a Waterfall chart whose dataset has a category column plus a companion sort column (e.g. `stage` and an integer `stage_order`).
2. In **Data → Sort by**, choose the sort column → categories render in that order rather than alphabetically. Toggle **Sort ascending** to reverse.
3. Choose the metric in **Sort by** → categories order by metric value (single-dimension case).
4. Clear **Sort by** → confirm the chart matches its previous rendering (backward-compatible).
Unit tests: `cd superset-frontend && npx jest plugins/plugin-chart-echarts/test/Waterfall/` — added `buildQuery` cases cover the default (unchanged) `orderby`, custom-column sort with auto-selection, descending, and metric-sort (no duplicate column).
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "DamianPendrak (via GitHub)" <gi...@apache.org>.
DamianPendrak commented on PR #42372:
URL: https://github.com/apache/superset/pull/42372#issuecomment-5668247655
The grain fix works, thanks a lot @gkneighb. One remaining issue - the stale sort key from my first comment isn't fixed yet: when the current metric (e.g. `AVG(global_sales)`) is selected in Sort by and the metric is then changed, the value doesn't reset and the query fails (`MIN("AVG(global_sales)")`) unless the user clears it manually. `shouldReset` is only handled by `XAxisSortControl`, not by `SelectControl`.
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "gkneighb (via GitHub)" <gi...@apache.org>.
gkneighb commented on PR #42372:
URL: https://github.com/apache/superset/pull/42372#issuecomment-5439549905
@DamianPendrak you're right, and thanks for the concrete repro — that made it easy to confirm. Fixed in `09dc2cf9af`.
The diagnosis holds up all the way down: `buildQuery` appended the sort key to `columns`, and `columns` becomes the GROUP BY in `get_sqla_query` (`models/helpers.py`, `columns = groupby or columns` → `groupby_all_columns`). So picking a sort column changed the grain from one row per category to one row per (category, sort column) pair. `transformProps` re-groups and re-sums, which is exactly why it looks fine — right up until the multiplied row count passes `row_limit` and the result gets truncated. Then the bars under-report with no error, which is the worst version of this bug.
**The fix: order by an aggregate instead of widening the GROUP BY.**
`columns` now stays exactly `[x_axis, ...groupby]`, and the sort key resolves three ways:
| Sort key | ORDER BY |
| --- | --- |
| already a grouping column (X-axis or breakdown) | the column, by label |
| the chart's metric | the metric label |
| any other dataset column | `MIN(col)` as a SIMPLE adhoc metric |
The aggregate goes straight into `orderby` rather than into `metrics` — the query builder already resolves adhoc metric dicts there via `adhoc_metric_to_sqla` and dedupes them against existing metric expressions, and it adds the expression to the SELECT automatically for engines where `allows_hidden_orderby_agg` is false. So your example becomes:
```sql
SELECT genre, SUM(global_sales)
FROM video_game_sales
GROUP BY genre
ORDER BY MIN(name) ASC, genre ASC
```
One row per genre, so `row_limit` truncates categories rather than silently eating rows out of them, and Sports stays at 1330.93.
I went this way rather than restricting the options to `{x-axis, metric}` like the shared `xAxisSortControl` does, because the case this control is for is a dedicated ordering column — a `step_order` that drives the waterfall's narrative sequence. That column is functionally dependent on the category, so `MIN` returns the column's own value and the ordering is exactly what you'd expect. For a column that *isn't* dependent on the category, "order categories by their lowest value of X" is at least well-defined and correct, rather than well-formed and wrong. I've updated the control description to say so.
**Second bug found while fixing this.** The grouped-column check was a raw `columns.includes(x_axis_sort)` string compare. An adhoc X-axis is an object, so it never matched, and sorting by the X-axis *itself* duplicated it into `columns` — changing the grain even in the case that should have been the safe one. Now compared via `getColumnLabel`, with a test covering it.
**Tests.** The two existing tests that asserted the old contract (`expect(query.columns).toContain('sort_order')`) are inverted into regression tests asserting the sort key never joins `columns` and never becomes a chart metric. Added coverage for the metric key, the X-axis key, the breakdown key, and the adhoc X-axis. 16/16 Waterfall tests pass.
Verification was at the query level plus the tests above — I haven't re-run the live `video_game_sales` chart. Happy to grab before/after screenshots if you'd like them on the PR.
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #42372:
URL: https://github.com/apache/superset/pull/42372#discussion_r4153568287
##########
superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/controlPanel.tsx:
##########
@@ -39,6 +44,66 @@ const config: ControlPanelConfig = {
['time_grain_sqla'],
['groupby'],
['metric'],
+ [
+ {
+ name: 'x_axis_sort',
+ config: {
+ type: 'SelectControl',
Review Comment:
`shouldReset` is ignored because this renders the plain `SelectControl`; only `XAxisSortControl` consumes that prop and calls `onChange(undefined)` (`src/explore/components/controls/XAxisSortControl.tsx:30-37`). After sorting by a metric and then changing the metric, the stale label therefore remains and `buildQuery` treats it as a dataset column, producing `MIN(<old metric label>)` and an unknown-column query failure. Render `XAxisSortControl` so the intended reset actually executes.
##########
superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/buildQuery.ts:
##########
@@ -17,22 +17,70 @@
* under the License.
*/
import {
+ AdhocMetricSimple,
buildQueryContext,
ensureIsArray,
+ getColumnLabel,
+ getMetricLabel,
+ QueryFormColumn,
QueryFormData,
+ QueryFormMetric,
+ QueryFormOrderBy,
} from '@superset-ui/core';
export default function buildQuery(formData: QueryFormData) {
- const { x_axis, granularity_sqla, groupby } = formData;
+ const {
+ x_axis,
+ granularity_sqla,
+ groupby,
+ x_axis_sort,
+ x_axis_sort_asc = true,
+ } = formData;
const columns = [
...ensureIsArray(x_axis || granularity_sqla),
...ensureIsArray(groupby),
];
- return buildQueryContext(formData, baseQueryObject => [
- {
- ...baseQueryObject,
- columns,
- orderby: columns?.map(column => [column, true]),
- },
- ]);
+ return buildQueryContext(formData, baseQueryObject => {
+ // Keep the category's rows contiguous by falling back to the x-axis (and
+ // breakdown) columns. This is also the ordering when no custom sort is set.
+ const baseOrderby: QueryFormOrderBy[] = columns.map(
+ (column: QueryFormColumn) => [column, true],
+ );
+ if (!x_axis_sort) {
+ return [{ ...baseQueryObject, columns, orderby: baseOrderby }];
+ }
+
+ const ascending = !!x_axis_sort_asc;
+ const isGroupedColumn = columns.some(
+ (column: QueryFormColumn) => getColumnLabel(column) === x_axis_sort,
+ );
+ const isMetric = ensureIsArray(baseQueryObject.metrics).some(
+ metric => getMetricLabel(metric) === x_axis_sort,
+ );
+ // A sort key that is already a grouping column or a selected metric can be
+ // referenced by label. Anything else is a bare dataset column, which an
+ // aggregated query cannot ORDER BY unless it is itself aggregated: adding
+ // it to `columns` instead would put it in the GROUP BY and change the grain
+ // of the query, inflating the row count until `row_limit` truncates it and
+ // the bars silently under-report (#42372). Wrapping it in MIN() orders the
+ // categories by that column without touching the grain.
+ const sortBy: QueryFormMetric =
+ isGroupedColumn || isMetric
+ ? x_axis_sort
+ : ({
+ expressionType: 'SIMPLE',
+ column: { column_name: x_axis_sort },
+ aggregate: 'MIN',
+ label: x_axis_sort,
+ hasCustomLabel: true,
+ } as AdhocMetricSimple);
Review Comment:
The PR description and testing notes still say that an unselected sort column is auto-added to the query, but this implementation deliberately wraps it in `MIN()` and leaves `columns` unchanged (as the updated test asserts). Please update the PR text to describe the hidden aggregate approach rather than the old grain-changing behavior.
##########
superset-frontend/plugins/plugin-chart-echarts/test/Waterfall/controlPanel.sort.test.ts:
##########
@@ -0,0 +1,68 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+import config from '../../src/Waterfall/controlPanel';
+
+// Walk the control panel config to grab a control's config by name.
+const findControl = (name: string): any => {
+ for (const section of (config as any).controlPanelSections) {
Review Comment:
The new helper opts out of type checking for both the control lookup and the config object. That hides contract mistakes such as returning `shouldReset` to a component that does not support it—the functional bug in this PR passes these tests for exactly that reason. Give the helper a narrow typed return shape and traverse the typed `ControlPanelConfig` directly instead of using `any`.
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #42372:
URL: https://github.com/apache/superset/pull/42372#discussion_r4408796088
##########
superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/controlPanel.tsx:
##########
@@ -37,6 +39,53 @@ const config: ControlPanelConfig = {
['time_grain_sqla'],
['groupby'],
['metric'],
+ [
+ {
+ name: 'x_axis_sort',
+ config: {
+ type: 'SelectControl',
+ label: t('Sort by'),
+ default: null,
+ clearable: true,
+ freeForm: false,
+ description: t(
+ 'Column or metric used to order the X-axis categories. ' +
+ 'Pick a dedicated sort column to control the category ' +
+ 'order — for example, to drive a waterfall movement ' +
+ 'narrative. Leave empty to sort by the X-axis value.',
+ ),
+ mapStateToProps: ({ datasource, controls }) => {
+ const choices = columnChoices(datasource);
+ const metric = controls?.metric?.value as
+ | QueryFormMetric
+ | undefined;
+ const metricLabel = metric ? getMetricLabel(metric) : undefined;
+ return {
+ choices:
+ metricLabel &&
+ !choices.some(([value]) => value === metricLabel)
+ ? [...choices, [metricLabel, metricLabel]]
+ : choices,
+ };
+ },
+ },
+ },
+ ],
+ [
+ {
+ name: 'x_axis_sort_asc',
+ config: {
+ type: 'CheckboxControl',
+ label: t('Sort ascending'),
+ default: true,
+ description: t(
+ 'Whether to sort ascending or descending on the X-axis.',
+ ),
Review Comment:
✅ **CodeAnt verified this suggestion was addressed in subsequent commits and marked this thread resolved** as of `cdeb48f`.
The description now says the X-axis categories are ordered by the selected sort field, rather than implying the sort is always by the X-axis field.
<sub>If that's not right, unresolve this thread and CodeAnt will leave it open.</sub>
<!-- codeant-auto-resolve-reply -->
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42372:
URL: https://github.com/apache/superset/pull/42372#issuecomment-5189403262
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "netlify[bot] (via GitHub)" <gi...@apache.org>.
netlify[bot] commented on PR #42372:
URL: https://github.com/apache/superset/pull/42372#issuecomment-5184075150
### <span aria-hidden="true">✅</span> Deploy Preview for *superset-docs-preview* ready!
| Name | Link |
|:-:|------------------------|
|<span aria-hidden="true">🔨</span> Latest commit | 6d51c6a562f4b03b7d548ecb02f6f8e6b93be06b |
|<span aria-hidden="true">🔍</span> Latest deploy log | https://app.netlify.com/projects/superset-docs-preview/deploys/6a7246d367b9160009834fef |
|<span aria-hidden="true">😎</span> Deploy Preview | [https://deploy-preview-42372--superset-docs-preview.netlify.app](https://deploy-preview-42372--superset-docs-preview.netlify.app) |
|<span aria-hidden="true">📱</span> Preview on mobile | <details><summary> Toggle QR Code... </summary><br /><br /><br /><br />_Use your smartphone camera to open QR code link._</details> |
|<span aria-hidden="true">🤖</span> Make changes | [Run an agent on this branch](https://app.netlify.com/projects/superset-docs-preview/agent-runs#Dcq7DYAgEADQXa7WiEJA3MAxjl8sQAicMca4u3SveC-UmlMh2AAGMBVPe3QHjzTdSL4GjHG0V6OcxpYr9eV8ifnZXX8S1SKk41IZPUvGmF65CD7A9wM) |
---
<!-- [superset-docs-preview Preview](https://deploy-preview-42372--superset-docs-preview.netlify.app) -->
_To edit notification comments on pull requests, go to your [Netlify project configuration](https://app.netlify.com/projects/superset-docs-preview/configuration/notifications#deploy-notifications)._
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "gkneighb (via GitHub)" <gi...@apache.org>.
gkneighb commented on PR #42372:
URL: https://github.com/apache/superset/pull/42372#issuecomment-5184078232
@DamianPendrak fixed in `6d51c6a562`.
The stale sort key is handled by mirroring the shared `xAxisSortControl` — `shouldMapStateToProps: () => true` plus a `shouldReset` flag that clears `x_axis_sort` once its value is no longer a current column or metric, so a stale metric label can't reach `buildQuery` and leak in as an unknown column. Added a control-panel test covering the reset.
Also addressed the two AI comments:
- Reworded the "Sort ascending" description to say it orders the X-axis categories by the selected sort field (not "on the X-axis").
- Removed the `xAxisSort`/`xAxisSortAsc` fields from `EchartsWaterfallFormData` — that type is the camelCase transformProps shape, but sorting is read as raw snake-case `x_axis_sort` in `buildQuery`, so those fields were dead and misleading.
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42372:
URL: https://github.com/apache/superset/pull/42372#issuecomment-5067257806
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on code in PR #42372:
URL: https://github.com/apache/superset/pull/42372#discussion_r3643690892
##########
superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/types.ts:
##########
@@ -51,6 +51,8 @@ export type EchartsWaterfallFormData = QueryFormData &
xAxisLabel: string;
xAxisTimeFormat?: string;
xTicksLayout?: WaterfallFormXTicksLayout;
+ xAxisSort?: string;
+ xAxisSortAsc?: boolean;
Review Comment:
<div>
<div id="suggestion">
<div id="issue"><b>Type naming mismatch with formData</b></div>
<div id="fix">
The type definition uses camelCase (`xAxisSort`/`xAxisSortAsc`) but the actual control names and formData keys use snake_case (`x_axis_sort`/`x_axis_sort_asc`). This mismatch between `EchartsWaterfallFormData` and the implementation could mislead developers into expecting `formData.xAxisSort` when the actual key is `formData.x_axis_sort`.
</div>
</div>
<small><i>Code Review Run #9040ae</i></small>
</div>
---
Should Bito avoid suggestions like this for future reviews? (<a href=https://alpha.bito.ai/home/ai-agents/review-rules>Manage Rules</a>)
- [ ] Yes, avoid them
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42372:
URL: https://github.com/apache/superset/pull/42372#issuecomment-5185626359
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers a full AI review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42372:
URL: https://github.com/apache/superset/pull/42372#issuecomment-5065781362
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #42372:
URL: https://github.com/apache/superset/pull/42372#issuecomment-5441891093
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
<details>
<summary>
Bito Usage Guide
</summary>
**Commands**
Type the following command in the pull request comment and save the comment.
- `/review` - Manually triggers an incremental AI Review.
- `/review full` - Manually triggers a full AI Review.
- `/pause` - Pauses automatic reviews on this pull request.
- `/resume` - Resumes automatic reviews.
- `/resolve` - Marks all Bito-posted review comments as resolved.
- `/abort` - Cancels all in-progress reviews.
Refer to the <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/available-commands" target="_blank" rel="noopener noreferrer">documentation</a> for additional commands.
**Configuration**
This repository uses `Superset` You can customize the agent settings <a href="https://alpha.bito.ai/home/ai-agents/code-review-agent" target="_blank" rel="noopener noreferrer">here</a> or contact your Bito workspace admin at evan@preset.io.
**Documentation & Help**
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/getting-started/install-run-using-bito-cloud/create-or-customize-an-agent-instance" target="_blank" rel="noopener noreferrer">Customize agent settings</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/implementing-custom-code-review-rules" target="_blank" rel="noopener noreferrer">Review rules</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent" target="_blank" rel="noopener noreferrer">General documentation</a>
- <a href="https://docs.bito.ai/bito-dev-agents/ai-code-review-agent/faqs" target="_blank" rel="noopener noreferrer">FAQ</a>
</details>
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #42372:
URL: https://github.com/apache/superset/pull/42372#issuecomment-5704636668
@gkneighb thanks for keeping this moving. Agreed with @DamianPendrak on the stale sort key. As far as I can tell `shouldReset` is only honored by `XAxisSortControl`, so returning it from a `SelectControl` is a no-op, and the test only checks the flag rather than the value actually clearing. Swapping the control type to `XAxisSortControl` (same as the shared `xAxisSortControl`) seems like it'd do it. Happy to re-review once that's in.
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #42372:
URL: https://github.com/apache/superset/pull/42372#issuecomment-5441666621
Nice diagnosis and fix on the grain-widening bug @DamianPendrak caught here. Wrapping the sort key in MIN() instead of stuffing it into columns seems right, and thanks for the tests covering it. @DamianPendrak mind confirming the fix now that it's in? Happy to get this merged once that's settled and CI's fully green.
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #42372:
URL: https://github.com/apache/superset/pull/42372#discussion_r3642716222
##########
superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/buildQuery.ts:
##########
@@ -19,20 +19,47 @@
import {
buildQueryContext,
ensureIsArray,
+ getMetricLabel,
QueryFormData,
} from '@superset-ui/core';
export default function buildQuery(formData: QueryFormData) {
- const { x_axis, granularity_sqla, groupby } = formData;
+ const {
+ x_axis,
+ granularity_sqla,
+ groupby,
+ x_axis_sort,
+ x_axis_sort_asc = true,
+ } = formData;
const columns = [
...ensureIsArray(x_axis || granularity_sqla),
...ensureIsArray(groupby),
];
- return buildQueryContext(formData, baseQueryObject => [
- {
- ...baseQueryObject,
- columns,
- orderby: columns?.map(column => [column, true]),
- },
- ]);
+ return buildQueryContext(formData, baseQueryObject => {
+ const isMetricSort =
+ !!x_axis_sort &&
+ ensureIsArray(baseQueryObject.metrics).some(
+ metric => getMetricLabel(metric) === x_axis_sort,
+ );
+ // A sort column that isn't already selected (and isn't a metric) must be
+ // added to the query so that ORDER BY can reference it.
+ const extraSortColumns =
+ x_axis_sort && !isMetricSort && !columns.includes(x_axis_sort)
+ ? [x_axis_sort]
+ : [];
Review Comment:
**Suggestion:** If the user selects metric-based sorting and then changes the metric, `x_axis_sort` can retain the old metric label; this logic then treats that stale value as a column and injects it into `columns`, which can produce backend query failures for unknown columns. Validate that the selected sort key is still present in current column/metric choices before adding it to the query, and drop/reset invalid stale values. [logic error]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ❌ Waterfall chart errors after changing metric with sort enabled.
- ⚠️ Users see backend query errors instead of updated chart.
```
</details>
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Open a Waterfall chart in Explore that uses the Waterfall control panel defined in
`superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/controlPanel.tsx:32-88`, and
set a metric in the `metric` control plus a sort by that metric via the `x_axis_sort`
SelectControl (lines 43-71).
2. Change the `metric` control to a different metric without touching `x_axis_sort`;
`mapStateToProps` for `x_axis_sort` at `controlPanel.tsx:58-69` rebuilds `choices` using
only the **current** metric label, but there is no logic here to clear or validate the
existing `controls.x_axis_sort.value`, so it can retain the old metric label as a stale
string.
3. Trigger a query (Run) so that `buildQuery(formData)` in
`superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/buildQuery.ts:26-65` is
called from
`superset-frontend/src/chartCustomizations/components/DeckglLayerVisibility/buildQuery.ts:27`,
passing `formData.x_axis_sort` containing the stale metric label and
`baseQueryObject.metrics` containing only the new metric.
4. Inside `buildQuery.ts`, `isMetricSort` at lines 39-42 evaluates to false because
`getMetricLabel` on the current metric no longer matches the stale `x_axis_sort` label;
`extraSortColumns` at lines 46-49 therefore treats `x_axis_sort` as a column name and
appends it to `columns`, and `orderby` at lines 53-56 orders by this same string, causing
the backend query to reference a non-existent column and return a query error instead of
rendering the updated chart.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=6983fc3879e24091aba179cc08989f0a&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=6983fc3879e24091aba179cc08989f0a&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/buildQuery.ts
**Line:** 39:49
**Comment:**
*Logic Error: If the user selects metric-based sorting and then changes the metric, `x_axis_sort` can retain the old metric label; this logic then treats that stale value as a column and injects it into `columns`, which can produce backend query failures for unknown columns. Validate that the selected sort key is still present in current column/metric choices before adding it to the query, and drop/reset invalid stale values.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42372&comment_hash=186157459e3bb28b703ce74d292acdb16f7ac4a9cdeb871a7fb5f94afee599e3&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42372&comment_hash=186157459e3bb28b703ce74d292acdb16f7ac4a9cdeb871a7fb5f94afee599e3&reaction=dislike'>👎</a>
##########
superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/controlPanel.tsx:
##########
@@ -37,6 +39,53 @@ const config: ControlPanelConfig = {
['time_grain_sqla'],
['groupby'],
['metric'],
+ [
+ {
+ name: 'x_axis_sort',
+ config: {
+ type: 'SelectControl',
+ label: t('Sort by'),
+ default: null,
+ clearable: true,
+ freeForm: false,
+ description: t(
+ 'Column or metric used to order the X-axis categories. ' +
+ 'Pick a dedicated sort column to control the category ' +
+ 'order — for example, to drive a waterfall movement ' +
+ 'narrative. Leave empty to sort by the X-axis value.',
+ ),
+ mapStateToProps: ({ datasource, controls }) => {
+ const choices = columnChoices(datasource);
+ const metric = controls?.metric?.value as
+ | QueryFormMetric
+ | undefined;
+ const metricLabel = metric ? getMetricLabel(metric) : undefined;
+ return {
+ choices:
+ metricLabel &&
+ !choices.some(([value]) => value === metricLabel)
+ ? [...choices, [metricLabel, metricLabel]]
+ : choices,
+ };
+ },
+ },
+ },
+ ],
+ [
+ {
+ name: 'x_axis_sort_asc',
+ config: {
+ type: 'CheckboxControl',
+ label: t('Sort ascending'),
+ default: true,
+ description: t(
+ 'Whether to sort ascending or descending on the X-axis.',
+ ),
Review Comment:
**Suggestion:** The user-facing description says the toggle controls sorting on the X-axis, but the implementation applies it to whatever field is selected in “Sort by” (which may be a metric or another column). Update the text to match actual behavior to avoid misleading users configuring sort semantics. [comment mismatch]
<details>
<summary><b>Severity Level:</b> Minor 🧹</summary>
```mdx
- ⚠️ Description slightly imprecise but matches effective axis behavior.
- ⚠️ Suggestion mainly cosmetic; functionality already matches intent.
```
</details>
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. In Explore for a Waterfall chart, enable the `x_axis_sort` control defined at
`superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/controlPanel.tsx:43-71`,
which makes the `x_axis_sort_asc` checkbox visible due to its `visibility` function at
lines 84-85.
2. Hover over or inspect the `x_axis_sort_asc` control, whose description is defined at
lines 81-83 as `t('Whether to sort ascending or descending on the X-axis.')`.
3. Run the chart and observe in
`superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/buildQuery.ts:53-56` that
the ascending/descending flag is applied to whatever field is selected in `x_axis_sort`
when constructing `orderby`, but in all cases this ultimately determines the left-to-right
order of categories along the X-axis.
4. Since toggling this checkbox does in fact control the ascending/descending order of
categories on the X-axis (regardless of whether the sort key is a metric or column), the
current description is broadly accurate; the suggestion is largely about phrasing nuance
rather than a functional mismatch, so the underlying issue is minor and mostly cosmetic.
```
</details>
[](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=1901c85ee60e42a991b5a4ab11061322&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) [](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=1901c85ee60e42a991b5a4ab11061322&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/plugins/plugin-chart-echarts/src/Waterfall/controlPanel.tsx
**Line:** 81:83
**Comment:**
*Comment Mismatch: The user-facing description says the toggle controls sorting on the X-axis, but the implementation applies it to whatever field is selected in “Sort by” (which may be a metric or another column). Update the text to match actual behavior to avoid misleading users configuring sort semantics.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42372&comment_hash=f86831a5e409d5ec9fa6231f96d51b2447942f19ade3814eb7e785f359fbb518&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F42372&comment_hash=f86831a5e409d5ec9fa6231f96d51b2447942f19ade3814eb7e785f359fbb518&reaction=dislike'>👎</a>
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #42372:
URL: https://github.com/apache/superset/pull/42372#issuecomment-5065835384
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/42372?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:x: Patch coverage is `58.33333%` with `10 lines` in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 65.26%. Comparing base ([`49f4e84`](https://app.codecov.io/gh/apache/superset/commit/49f4e84b486b9c75ea6ed3cf455adf8ab206cbb7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`716adb3`](https://app.codecov.io/gh/apache/superset/commit/716adb30124fdbd5e1801a24458d44fb093c95c0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
| [Files with missing lines](https://app.codecov.io/gh/apache/superset/pull/42372?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...lugin-chart-echarts/src/Waterfall/controlPanel.tsx](https://app.codecov.io/gh/apache/superset/pull/42372?src=pr&el=tree&filepath=superset-frontend%2Fplugins%2Fplugin-chart-echarts%2Fsrc%2FWaterfall%2FcontrolPanel.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-c3VwZXJzZXQtZnJvbnRlbmQvcGx1Z2lucy9wbHVnaW4tY2hhcnQtZWNoYXJ0cy9zcmMvV2F0ZXJmYWxsL2NvbnRyb2xQYW5lbC50c3g=) | 0.00% | [10 Missing :warning: ](https://app.codecov.io/gh/apache/superset/pull/42372?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #42372 +/- ##
==========================================
- Coverage 65.26% 65.26% -0.01%
==========================================
Files 2794 2794
Lines 157516 157537 +21
Branches 36037 36050 +13
==========================================
+ Hits 102797 102809 +12
- Misses 52741 52750 +9
Partials 1978 1978
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/42372/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/42372/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `71.25% <58.33%> (-0.01%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/superset/pull/42372?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
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
Re: [PR] feat(waterfall): custom sort for X-axis categories [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on PR #42372:
URL: https://github.com/apache/superset/pull/42372#issuecomment-6488243551
## <a href="https://codeant.ai/" title="CodeAnt AI"><img src="https://new-codeant-butcket.s3.us-west-1.amazonaws.com/badges/codeant-block-purple-v2.svg" width="28" height="28" align="absmiddle" style="vertical-align:middle" alt="CodeAnt" /></a> CodeAnt PR Risk
**🟢 Low Risk**
- The PR appears safe to merge; stale metric sort choices are reset, and tests cover metric changes and preserving the query grain.
- The sort-toggle description now accurately says categories are ordered by the selected sort field.
**Assessed commit:** `cdeb48fe5bb0`
--
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