aglinxinyuan opened a new pull request, #5797: URL: https://github.com/apache/texera/pull/5797
### What changes were proposed in this PR? Pin defaults, mutability, JSON round-trip, and annotation surface for three small Jackson-deserializable config classes in the visualization operator subtree. Each one lives on a descriptor's wire-format (frontend ↔ backend JSON), so any drift in defaults, wire-key names, or annotation values silently breaks the workflow saved-state round-trip. No production-code changes. | Spec | Source class | Tests | | --- | --- | --- | | `BulletChartStepDefinitionSpec` | `BulletChartStepDefinition` | 7 | | `HierarchySectionSpec` | `HierarchySection` | 7 | | `BandConfigSpec` | `BandConfig` | 9 | All three spec files follow the `<srcClassName>Spec.scala` one-to-one convention. **Behavior pinned — `BulletChartStepDefinition`** | Surface | Contract | | --- | --- | | Construction | stores both `@JsonCreator` constructor arguments | | Mutability | both `var` fields are reassignable | | Wire keys | serializes under `start` / `end` (tree-API verified) | | JSON round-trip | preserves both fields | | Annotations | `@JsonProperty(\"start\")` and `@JsonProperty(\"end\")` live on the **constructor parameters** (Scala's default for `var` ctor params unless `@meta.field` is used); verified via `Constructor.getParameterAnnotations` | | Instance independence | no static state shared | **Behavior pinned — `HierarchySection`** | Surface | Contract | | --- | --- | | Defaults | `attributeName == \"\"` | | Mutability | `attributeName` is reassignable | | JSON round-trip | preserves the field, including the default-empty case | | Annotations | `@JsonProperty(required = true)` + `@AutofillAttributeName` + `@NotNull(\"Attribute Name cannot be empty\")` | | Instance independence | no static state shared | **Behavior pinned — `BandConfig`** | Surface | Contract | | --- | --- | | Inheritance | extends `LineConfig` (compile-time enforced) | | Defaults | `yUpper`, `yLower`, `fillColor` all default to `\"\"` | | Mutability | all three fields are reassignable | | JSON round-trip | preserves all three fields | | `yUpper` annotations | `@JsonProperty(required = true)` + `@NotNull(\"Y-Axis Upper Bound cannot be empty\")` + `@AutofillAttributeName` | | `yLower` annotations | `@JsonProperty(required = true)` + `@NotNull(\"Y-Axis Lower Bound cannot be empty\")` + `@AutofillAttributeName` | | `fillColor` annotations | `@JsonProperty(required = false)`, **no** `@NotNull` | | Instance independence | no static state shared | ### Any related issues, documentation, discussions? Closes #5794. ### How was this PR tested? Pure unit-test additions; verified locally with: - `sbt \"WorkflowOperator/testOnly org.apache.texera.amber.operator.visualization.bulletChart.BulletChartStepDefinitionSpec org.apache.texera.amber.operator.visualization.hierarchychart.HierarchySectionSpec org.apache.texera.amber.operator.visualization.continuousErrorBands.BandConfigSpec\"` — 23 tests, all green - `sbt \"WorkflowOperator/Test/scalafmtCheck\"` — clean - CI to confirm ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 4.7 [1M context]) -- 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]
