Skip to content

feat(workflow-operator): require a Name Column in Pie Chart - #9633

Draft
Matthew-DWM wants to merge 1 commit into
apache:mainfrom
Matthew-DWM:feat/pie-chart-name-column
Draft

Matthew-DWM wants to merge 1 commit into
apache:mainfrom
Matthew-DWM:feat/pie-chart-name-column

Conversation

@Matthew-DWM

Copy link
Copy Markdown

What changes were proposed in this PR?

Pie Chart marks its Name Column as required with @NotNull, which accepts an empty string, and only the Value Column was checked for being non-empty. A Pie Chart with Value set and Name left blank therefore compiled, and the run failed in pandas.

Before:  Name left empty -> compiles -> dropna(subset=[value, ""]) -> KeyError: ['']
After:   Name left empty -> compile error on the operator: "Name Column cannot be empty"

manipulateTable and createPlotlyFigure now assert that the name is non-empty, right after the existing Value check and with the message Radar Chart uses. The compiler already turns an assertion raised during code generation into an error on that operator, so the editor shows it before anything runs.

Any related issues, documentation, discussions?

Closes #8167. Builds on #8168 by @carloea2.

How was this PR tested?

The new tests were written before the fix and all pass with it; 3 of them fail on main.

PieChartOpDescSpec replaces the test that pinned the old behaviour ("render successfully when only name is empty") with three tests. Each sets Value, leaves Name empty, and expects "Name Column cannot be empty" from manipulateTable, createPlotlyFigure and generatePythonCode respectively. The existing tests that expect the Value error first still pass, and all 11 tests in the spec pass.

WorkflowOperator/test passes (3,016 unit and 85 integration tests), as do WorkflowCompiler/test (87) and scalafmtCheckAll / scalafixAll --check.

Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)

Pie Chart declared its Name Column required with @NotNull, which accepts an
empty string, and only the Value Column was asserted non-empty. An empty name
therefore passed code generation and reached pandas as dropna(subset=[value,
""]), failing the run with a KeyError. Both generation stages now assert the
name is non-empty, as Radar Chart does, so the editor reports "Name Column
cannot be empty" as a compile error before anything runs. The test that pinned
the old asymmetry is replaced by rejection tests for each stage.
@github-actions

Copy link
Copy Markdown
Contributor

Automated Reviewer Suggestions

Based on the git blame history of the changed files, we recommend the following reviewers:

  • Contributors with relevant context: @aglinxinyuan
    You can notify them by mentioning @aglinxinyuan in a comment.

@Matthew-DWM
Matthew-DWM marked this pull request as draft November 23, 2026 17:49

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pie Chart crashes when Name Column is empty

1 participant