kz930 opened a new issue, #7213:
URL: https://github.com/apache/texera/issues/7213

   ### What happened?
   
   Seven visualization settings accept only a number but are declared as plain 
strings, so their generated schema is `{"type":"string"}` with no `pattern`, 
`minimum` or `enum`. Nothing stops a non-numeric value in the form, and each 
operator then does something different with it at run time.
   
   | Operator | Setting | Consumed as | A non-numeric value produces |
   | --- | --- | --- | --- |
   | `GaugeChartOpDesc` | `delta`, `threshold` | `float(...)` | **the value is 
silently discarded** — `except ValueError` sets it to `None`, and the chart 
renders as if the field were empty |
   | `BulletChartOpDesc` | `thresholdValue` | `float(...)` | silently 
discarded, same as above |
   | `BulletChartOpDesc` | `deltaReference` (required) | `float(...)` | an 
error page: `Bullet chart is not available. Reason: General error: could not 
convert string to float: 'abc'` |
   | `BulletChartOpDesc` | each step's `start` / `end` | `float(...)` | reaches 
the outer `except Exception` and so produces the same error page (read from the 
source; not executed, because the steps list needs building) |
   | `ContourPlotOpDesc` | `gridSize` (optional) | `int(...)` | the operator 
fails outright: `ValueError: invalid literal for int() with base 10: 'abc'` |
   
   Verified by generating each operator's module and executing it against a 
three-row frame. For `GaugeChartOpDesc.delta` the figure spec shows the 
difference plainly:
   
   | `delta` | `"reference"` in the rendered figure |
   | --- | --- |
   | `5` | `"reference":5.0` |
   | `abc` | absent |
   | empty | absent |
   
   So a user who types `abc` into Delta gets a finished-looking gauge with the 
delta indicator silently missing. That is the worst of the three behaviours, 
and `thresholdValue` behaves the same way — while `deltaReference`, in the same 
operator, reports an error instead.
   
   `ContourPlotOpDesc.gridSize` additionally rejects `2.5`, since it uses 
`int()` rather than `float()` — a restriction stated nowhere in the field's 
title or description.
   
   Expected: a setting that accepts only numbers declares that in a way the 
form can enforce before the run, and the operators agree on what an unusable 
value means.
   
   ### How to reproduce?
   
   1. Give Gauge Chart a numeric Value column and type `abc` into Delta.
   2. Run — a gauge appears, no warning is shown, and the delta indicator is 
absent; the figure is the same as leaving Delta empty.
   3. The same input in Bullet Chart's Delta Reference produces an error page, 
and in Contour Plot's Grid Size fails the operator.
   
   ### Version/Branch
   
   1.3.0-incubating-SNAPSHOT (main)
   
   ### Relevant log output
   
   ```shell
   (GaugeChart and BulletChart's thresholdValue produce no error at all)
   Bullet chart is not available. Reason: General error: could not convert 
string to float: 'abc'
   ValueError: invalid literal for int() with base 10: 'abc'
   ```
   


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