aglinxinyuan opened a new pull request, #5827:
URL: https://github.com/apache/texera/pull/5827

   ### What changes were proposed in this PR?
   
   Pin behavior of three previously-untested visualization descriptors in 
`common/workflow-operator/`. No production-code changes.
   
   | Spec | Source class | Tests |
   | --- | --- | --- |
   | `HtmlVizOpDescSpec` | `HtmlVizOpDesc` | 4 |
   | `CandlestickChartOpDescSpec` | `CandlestickChartOpDesc` | 5 |
   | `Histogram2DOpDescSpec` | `Histogram2DOpDesc` | 6 |
   
   All three spec files follow the `<srcClassName>Spec.scala` one-to-one 
convention.
   
   **Behavior pinned**
   
   | Surface | Contract |
   | --- | --- |
   | `operatorInfo` | exact name + visualization group (`MEDIA` / `FINANCIAL` / 
`STATISTICAL`); one input / one output |
   | Output schema | all three emit a single `html-content` STRING column 
(`HtmlViz` via `getExternalOutputSchemas`; charts via `getOutputSchemas`) |
   | `getPhysicalOp` wiring (`HtmlViz`) | 
`OpExecWithClassName("…htmlviz.HtmlVizOpExec")`; port **identities** carried 
forward |
   | Field defaults | `Candlestick` OHLC columns default `""`; `Histogram2D` 
`xBins`/`yBins == 10`, `normalize == DENSITY` |
   | `generatePythonCode` | `Candlestick` emits a Plotly `go.Candlestick(` 
figure; `Histogram2D` emits `px.density_heatmap(` and **rejects a non-positive 
bin count** (`AssertionError`) |
   | Round-trip | all config fields preserved through the polymorphic base |
   
   The specs pin the stable contract (operatorInfo + output schema + codegen 
guards) rather than the full Plotly template, and never assert on interpolated 
`EncodableString` values (which are decoded at runtime, not embedded raw).
   
   ### Any related issues, documentation, discussions?
   
   Closes #5824.
   
   ### How was this PR tested?
   
   Pure unit-test additions; verified locally with:
   
   - `sbt "WorkflowOperator/testOnly 
org.apache.texera.amber.operator.visualization.htmlviz.HtmlVizOpDescSpec 
org.apache.texera.amber.operator.visualization.candlestickChart.CandlestickChartOpDescSpec
 
org.apache.texera.amber.operator.visualization.histogram2d.Histogram2DOpDescSpec"`
 — 15 tests, all green
   - `sbt "WorkflowOperator/Test/scalafmtCheck"` and `sbt 
"WorkflowOperator/Test/scalafix --check"` — clean
   - CI to confirm
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Opus 4.8 [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]

Reply via email to