Task Summary
Add dedicated unit-specs for four small Jackson-annotated config classes that back visualization operators in common/workflow-operator/operator/visualization/. Pin defaults, mutability, JSON serde, and required-field validation so accidental drift in a Jackson annotation (or default value) is caught before it ships to a chart that depends on it.
Background
Four config classes in common/workflow-operator/operator/visualization/ currently lack a dedicated unit-spec. Each is a small Jackson-serializable bag carrying a single attribute name (sometimes two) used by the corresponding visualization operator:
| Source class |
Package |
Fields |
TablesConfig |
tablesChart |
attributeName: EncodableString = "" (required, @NotNull) |
NestedTableConfig |
nestedTable |
attributeGroup, originalName (required), newName (optional) |
FigureFactoryTableConfig |
figureFactoryTable |
attributeName: EncodableString = "" (required) |
DumbbellDotConfig |
dumbbellPlot |
dotValue: EncodableString = "" (required, @NotNull, integer/long/double-only via @JsonSchemaInject) |
Behavior to pin
For each config class:
| Surface |
Contract |
| Default field values |
the documented defaults ("", etc.) hold on a fresh instance |
| Mutability |
fields are var and can be assigned post-construction (mutability is part of the Jackson-bag contract — readers need this) |
JSON round-trip via objectMapper.writeValueAsString + readValue |
preserves every field |
@JsonProperty(required = true) annotation |
present on the documented required field(s) — verified via reflection |
| Distinct instances |
two new TablesConfig (etc.) are independent (no static-field leakage) |
@NotNull annotation |
present on the documented @NotNull field(s) — verified via reflection |
Scope
- New spec files (one per source class per the spec-filename convention):
TablesConfigSpec.scala
NestedTableConfigSpec.scala
FigureFactoryTableConfigSpec.scala
DumbbellDotConfigSpec.scala
- No production-code changes.
- The Jackson serde tests use
org.apache.texera.amber.util.JSONUtils.objectMapper (already wired with the project's modules).
Task Type
Task Summary
Add dedicated unit-specs for four small Jackson-annotated config classes that back visualization operators in
common/workflow-operator/operator/visualization/. Pin defaults, mutability, JSON serde, and required-field validation so accidental drift in a Jackson annotation (or default value) is caught before it ships to a chart that depends on it.Background
Four config classes in
common/workflow-operator/operator/visualization/currently lack a dedicated unit-spec. Each is a small Jackson-serializable bag carrying a single attribute name (sometimes two) used by the corresponding visualization operator:TablesConfigtablesChartattributeName: EncodableString = ""(required,@NotNull)NestedTableConfignestedTableattributeGroup,originalName(required),newName(optional)FigureFactoryTableConfigfigureFactoryTableattributeName: EncodableString = ""(required)DumbbellDotConfigdumbbellPlotdotValue: EncodableString = ""(required,@NotNull, integer/long/double-only via@JsonSchemaInject)Behavior to pin
For each config class:
"", etc.) hold on a fresh instancevarand can be assigned post-construction (mutability is part of the Jackson-bag contract — readers need this)objectMapper.writeValueAsString+readValue@JsonProperty(required = true)annotationnew TablesConfig(etc.) are independent (no static-field leakage)@NotNullannotation@NotNullfield(s) — verified via reflectionScope
TablesConfigSpec.scalaNestedTableConfigSpec.scalaFigureFactoryTableConfigSpec.scalaDumbbellDotConfigSpec.scalaorg.apache.texera.amber.util.JSONUtils.objectMapper(already wired with the project's modules).Task Type