aglinxinyuan opened a new issue, #5767:
URL: https://github.com/apache/texera/issues/5767
### Task Summary
Add dedicated unit-specs for four small contract / config classes in
`common/workflow-operator/`. Each is too thin to justify its own PR but the
bundle stays cohesive (everything sits in the descriptor / metadata surface).
## Background
| Source class | Package | Purpose |
| --- | --- | --- |
| `SourceOperatorDescriptor` | `operator.source` | Abstract base for source
operators; declares one extra abstract member `sourceSchema(): Schema` on top
of `LogicalOp` |
| `PythonSourceOperatorDescriptor` | `operator.source` | Abstract — mixes
`SourceOperatorDescriptor` with `PythonOperatorDescriptor` so Python source
operators inherit both contracts |
| `GaugeChartSteps` | `operator.visualization.gaugeChart` | Jackson-bag
config class with two `var` fields (`start`, `end`) used by the gauge-chart
visualization operator |
| `DummyProperties` | `operator` | Jackson-bag with two `var` fields
(`dummyProperty`, `dummyValue`); appears in test fixtures and the dummy
operator |
## Behavior to pin
### `SourceOperatorDescriptor`
| Surface | Contract |
| --- | --- |
| `sourceSchema()` | declared as an abstract method (pinned via a minimal
test-only concrete subclass) |
| Subclass of `LogicalOp` | type-pattern matches the parent (a
`SourceOperatorDescriptor` is a `LogicalOp`) |
### `PythonSourceOperatorDescriptor`
| Surface | Contract |
| --- | --- |
| Composition | extends `SourceOperatorDescriptor` AND mixes
`PythonOperatorDescriptor` (compile-time enforced + type-pattern in the test) |
| `sourceSchema()` | still declared as an abstract member (inherited from
`SourceOperatorDescriptor`) |
### `GaugeChartSteps`
| Surface | Contract |
| --- | --- |
| Defaults | `start == ""` and `end == ""` on a fresh instance |
| Mutability | both fields are `var`-assignable post-construction |
| JSON round-trip | preserves both fields; wire-keys are `start` / `end` |
| Instance independence | no static state shared across `new` |
### `DummyProperties`
| Surface | Contract |
| --- | --- |
| Defaults | `dummyProperty == ""` and `dummyValue == ""` |
| Mutability | both fields are `var`-assignable |
| JSON round-trip | preserves both fields |
| `@JsonProperty` annotations | present on both fields (verified via
reflection) |
## Scope
- New spec files (one per source class per the spec-filename convention):
- `SourceOperatorDescriptorSpec.scala`
- `PythonSourceOperatorDescriptorSpec.scala`
- `GaugeChartStepsSpec.scala`
- `DummyPropertiesSpec.scala`
- No production-code changes.
### Task Type
- [ ] Refactor / Cleanup
- [ ] DevOps / Deployment / CI
- [x] Testing / QA
- [ ] Documentation
- [ ] Performance
- [ ] Other
--
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]