Matthew-DWM opened a new pull request, #9633:
URL: https://github.com/apache/texera/pull/9633
### 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)
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]