You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "dosubot[bot] (via GitHub)" <gi...@apache.org> on 2026/05/02 02:50:25 UTC
Re: [D] How to sort time series column correctly in Time-Series table ? [superset]
GitHub user dosubot[bot] edited a comment on the discussion: How to sort time series column correctly in Time-Series table ?
<!-- Greeting -->
Hi @BNyamkhuu! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the superset team.
<!-- Answer -->
Both issues you're describing — D3-formatted columns sorting lexicographically and Sparkline columns failing to sort — have been identified and fixed in recent PRs:
1. **Column sorting always falling back to the first column** (which affects both D3-formatted and Sparkline columns): The root cause was that the `sortNumberWithMixedTypes` comparator tried to access a `data-value` prop that didn't actually exist in react-table's row model, causing every comparison to return `0` (equal) and fall back to the default first-column sort. This was fixed in [PR #38579](https://github.com/apache/superset/pull/38579) (merged March 19, 2026), which rewrites the sort function to extract the raw numeric value directly from each cell's React props — handling both ValueCell and SparklineCell types [[1]](https://github.com/apache/superset/pull/38579) [[2]](https://github.com/apache/superset/pull/38579).
2. **D3 formatter initialization causing string-based sorting**: A separate issue where `setupFormatters` was called asynchronously (after first render), which could cause numbers to be treated as plain strings. This was fixed in [PR #35529](https://github.com/apache/superset/pull/35529) (merged October 2025) by making the formatter setup synchronous [[3]](https://github.com/apache/superset/pull/35529).
Since you're running a Docker image from ~4 months ago (likely pre-dating the March 2026 fix), **upgrading to a newer Superset build that includes PR #38579** should resolve both the D3-format sorting and Sparkline sorting issues you're experiencing.
There are also two open PRs that address remaining edge cases:
- [PR #38094](https://github.com/apache/superset/pull/38094) — fixes null values being coerced to `0` instead of preserved as `null` [[4]](https://github.com/apache/superset/pull/38094)
- [PR #38828](https://github.com/apache/superset/pull/38828) — fixes sorting for date-prefixed or complex column keys where the row value lookup can fail [[5]](https://github.com/apache/superset/pull/38828)
<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).*
---
Share context across your team and agents. Try [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-tagline&utm_term=apache%2Fsuperset).
[](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-feedback&utm_term=apache%2Fsuperset&message_id=bc369e8c-4a89-4ae8-be28-052c60e7b4a4) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-learn-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=knowledge-infrastructure-add-team&utm_term=apache%2Fsuperset)
GitHub link: https://github.com/apache/superset/discussions/38937#discussioncomment-16375648
----
This is an automatically sent email for notifications@superset.apache.org.
To unsubscribe, please send an email to: notifications-unsubscribe@superset.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org