Yicong-Huang opened a new pull request, #4812:
URL: https://github.com/apache/texera/pull/4812

   ### What changes were proposed in this PR?
   
   Adds scalatest coverage for four more visualization operator descriptors. 
New specs for `HeatMapOpDesc` and `LineChartOpDesc`; existing thin `BarChart` 
and `PieChart` specs are extended with the same shape used in the previous 
bundle (#4809).
   
   Each spec covers `operatorInfo` (name + group + outputPort count), 
`getOutputSchemas` (single-port `html-content` STRING), `generatePythonCode` 
(operator class + plotly imports + `decode_python_template` runtime decode-site 
count for each `EncodableString`), and the missing-required-field behavior — 
which differs by OpDesc:
   
   - `HeatMap` asserts on `x`, `y`, `value` (all three).
   - `BarChart` asserts on `value` and `fields` with explicit messages ("Value 
column cannot be empty" / "Fields cannot be empty").
   - `PieChart` asserts only on `value` — `name` has no guard, so an empty-name 
configuration still renders.
   - `LineChart` has no asserts but its `lines` field defaults to `null`; 
calling `generatePythonCode` on a default-constructed instance raises 
`NullPointerException` (see Bug filed below).
   
   ### Any related issues, documentation, discussions?
   
   Closes #4810.
   
   Bug filed separately: `LineChartOpDesc.generatePythonCode` throws 
`NullPointerException` when `lines` is left at its `null` default, instead of 
raising `AssertionError` like the other visualizers or rendering an empty chart.
   
   ### How was this PR tested?
   
   ```
   sbt scalafmtCheckAll
   sbt "WorkflowOperator/testOnly 
org.apache.texera.amber.operator.visualization.heatMap.HeatMapOpDescSpec 
org.apache.texera.amber.operator.visualization.barChart.BarChartOpDescSpec 
org.apache.texera.amber.operator.visualization.lineChart.LineChartOpDescSpec 
org.apache.texera.amber.operator.visualization.pieChart.PieChartOpDescSpec"
   ```
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (claude-opus-4-7)


-- 
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