Skip to content

fix(echarts): rename time series shifted without dimensions#34541

Merged
justinpark merged 5 commits into
apache:masterfrom
justinpark:hotfix--rename-for-time-series-without-dimensions
Aug 6, 2025
Merged

fix(echarts): rename time series shifted without dimensions#34541
justinpark merged 5 commits into
apache:masterfrom
justinpark:hotfix--rename-for-time-series-without-dimensions

Conversation

@justinpark
Copy link
Copy Markdown
Member

SUMMARY

This commit updates the rename operator logic to handle cases that contain only metrics without dimensions but contain multiple time shifts.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before (single metric):

Screenshot_2025-08-04_at_4_33_49 PM

After (single metric):

Screenshot_2025-08-04_at_4_33_54 PM

Before (multiple metrics):

Screenshot_2025-08-04_at_4_32_58 PM

After (multiple metrics):

Screenshot_2025-08-04_at_4_32_52 PM

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • 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

@dosubot dosubot Bot added the change:frontend Requires changing the frontend label Aug 5, 2025
Copy link
Copy Markdown

@korbit-ai korbit-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've completed my review and didn't find any issues.

Files scanned
File Path Reviewed
superset-frontend/packages/superset-ui-chart-controls/src/operators/renameOperator.ts

Explore our documentation to understand the languages and file types we support and the files we ignore.

Check out our docs on how you can make Korbit work best for you and your team.

Loving Korbit!? Share us on LinkedIn Reddit and X

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the rename operator logic to handle time series charts with multiple time shifts but no dimensions. Previously, the operator only applied when dimensions existed, but the fix now also applies when multiple time shift metrics are present, improving chart readability by properly renaming metric columns.

  • Updates the condition to include cases with multiple time shifts even without dimensions
  • Adds comprehensive test coverage for both single and multiple time shift scenarios
  • Improves chart labeling for time comparison visualizations without dimensional grouping

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
superset-frontend/packages/superset-ui-chart-controls/src/operators/renameOperator.ts Updates the core logic to apply rename operation when multiple time shifts exist, even without dimensions
superset-frontend/packages/superset-ui-chart-controls/test/operators/renameOperator.test.ts Adds test cases for single and multiple time shift scenarios to verify the updated behavior
Comments suppressed due to low confidence (2)

superset-frontend/packages/superset-ui-chart-controls/test/operators/renameOperator.test.ts:68

  • [nitpick] The test name is unclear. Consider renaming to 'should skip renameOperator when no dimensions exist and only single time shift' to better describe the specific condition being tested.
test('should skip renameOperator if series does not exist and a single time shift exists', () => {

superset-frontend/packages/superset-ui-chart-controls/test/operators/renameOperator.test.ts:110

  • [nitpick] The test name has grammatical issues. Consider renaming to 'should add renameOperator when metric exists with multiple time shifts' for better clarity and grammatical correctness.
test('should add renameOperator if a metric exists and multiple time shift', () => {

Copy link
Copy Markdown
Member

@Antonio-RiveroMartnez Antonio-RiveroMartnez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@justinpark justinpark merged commit 6f5d9c9 into apache:master Aug 6, 2025
55 checks passed
michael-s-molina pushed a commit that referenced this pull request Aug 6, 2025
LisaHusband pushed a commit to LisaHusband/superset that referenced this pull request Aug 17, 2025
@github-actions github-actions Bot added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 6.0.0 First shipped in 6.0.0 labels Dec 18, 2025
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels change:frontend Requires changing the frontend packages size/M 🚢 6.0.0 First shipped in 6.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants