kz930 opened a new issue, #7212:
URL: https://github.com/apache/texera/issues/7212
### What happened?
- `gridSize` is an `EncodableString` consumed as `grid_size = int(<value>)`,
with no guard around it.
- Its generated schema is
`{"propertyOrder":4,"nullable":true,"type":"string","default":"10","description":"Grid
resolution of the final image","title":"Grid Size"}`, and the property is
absent from the schema's `required` list. So the form presents optional free
text, and because the declared type is `string` the form cannot constrain it to
an integer.
Executing the generated module against a six-row frame:
| Grid Size | result |
| --- | --- |
| `10` | chart renders |
| empty — the field is optional, so clearing it is legal | **`ValueError:
invalid literal for int() with base 10: ''`** |
| `abc` | **`ValueError: ... 'abc'`** |
| `2.5` | **`ValueError: ... '2.5'`** — `int()` rejects a decimal string |
The only input the operator accepts is an integer literal, while its
metadata promises an optional string. The empty case is the sharpest: the form
says the field may be left blank, and leaving it blank aborts the run.
Worth noting for contrast: `GaugeChartOpDesc` and `BulletChartOpDesc` model
the same kind of numeric knob as a string but do guard emptiness — `float(x) if
x.strip() else None` — so they survive a cleared field. ContourPlot has no such
guard, which suggests an omission rather than a decision.
Expected: either the value is constrained before the run (a numeric
property, or a schema constraint the form can enforce), or empty and
non-numeric values fall back to the documented default of `10` rather than
aborting.
### How to reproduce?
1. Chain a source carrying three numeric columns into Contour Plot and set
X, Y and Z.
2. Clear Grid Size — or type `2.5` — and run.
3. The operator fails with the error below. `10` in the same field succeeds.
### Version/Branch
1.3.0-incubating-SNAPSHOT (main)
### Relevant log output
```shell
ValueError: invalid literal for int() with base 10: ''
```
--
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]