kz930 opened a new issue, #7209:
URL: https://github.com/apache/texera/issues/7209
### What happened?
- `HistogramChartOpDesc.marginal` is a plain string whose legal values exist
only in `@JsonPropertyDescription("Distribution type (rug, box, violin).")`.
Nothing machine-readable constrains it, so the schema the UI builds its form
from is just
`{"propertyOrder":6,"nullable":true,"type":"string","description":"Distribution
type (rug, box, violin).","title":"Distribution Type"}` — a free-text box.
- The value is interpolated straight into `px.histogram(...,
marginal=<value>)`, so anything plotly does not recognise reaches plotly
untouched and fails inside it.
Generating the operator's module and executing it against a five-row frame:
| Distribution Type | result |
| --- | --- |
| empty | chart renders |
| `box` | chart renders |
| `viloin` — one letter off | **`AttributeError: 'NoneType' object has no
attribute 'constructor'`** |
The error mentions nothing the user typed, so the cause is not discoverable
from it.
Expected: the form offers the values the operator supports, as other
operators already do — `ECDFPlotOpDesc` declares `@JsonSchemaInject(json = """{
"enum": ["probability", "count", "sum"], "default": "probability" }""")` for
each of its string modes. The operator form is built by ngx-formly's
`FormlyJsonschema`, which renders an `enum` as a dropdown, so this needs no
frontend change.
One thing to settle while fixing: `px.histogram` also accepts `histogram`,
not just the three values in the description — so the enum is a chance either
to expose that fourth value or to state the restriction deliberately.
### How to reproduce?
1. Chain a source carrying a numeric column into Histogram.
2. Set Value Column, and type `viloin` into Distribution Type.
3. Run — the operator fails with the error below. Typing `box` in the same
field succeeds.
### Version/Branch
1.3.0-incubating-SNAPSHOT (main)
### Relevant log output
```shell
AttributeError: 'NoneType' object has no attribute 'constructor'
```
--
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]