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

   ### What happened?
   
   `TimeSeriesOpDesc.plotType` — shown as **Plot Type** — is a plain string. 
Its two legal values exist only in `@JsonPropertyDescription("Select the type 
of time series plot (line, area).")`, and nothing machine-readable constrains 
it, so the schema the form is built from is a free-text box.
   
   The value is then matched exactly: `val plotFunc = if (plotType == "area") 
"px.area" else "px.line"`. Everything that is not the literal `area` falls into 
the `else` branch, so the operator draws a line chart and reports nothing.
   
   Generating the operator's module from `main` for three values:
   
   | Plot Type | Generated call |
   | --- | --- |
   | `area` | `px.area(table, ...)` |
   | `Area` — capitalised | `px.line(table, ...)` |
   | `aera` — one letter off | `px.line(table, ...)` |
   
   There is no error, no warning, and no visible difference from having asked 
for a line chart in the first place. `Area` is the sharp case: it is what a 
user is most likely to type, and it silently produces the chart they did not 
ask for.
   
   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.
   
   Worth noting for whoever fixes it: the property's declared name is `line` 
(`@JsonProperty(value = "line", defaultValue = "line")`), while its title is 
Plot Type and its value may be `area`. That name is what saved workflows carry, 
so it cannot be changed, but an `enum` added under it makes the field 
self-describing regardless.
   
   Related but distinct: #7209 reports the same unconstrained-string shape on 
Histogram's Distribution Type. There the typo reaches plotly and fails with an 
internal error, so the user at least sees something go wrong; here the run 
succeeds and the chart is quietly the wrong kind.
   
   ### How to reproduce?
   
   1. Chain a source carrying a timestamp column and a numeric column into Time 
Series Plot.
   2. Set Time Column and Value Column, and type `Area` into Plot Type.
   3. Run — a line chart appears, identical to what `line` produces. Typing 
`area` in the same field produces the area chart.
   
   ### Version/Branch
   
   1.3.0-incubating-SNAPSHOT (main)
   
   ### Relevant log output
   
   ```shell
   (no error is produced — the operator succeeds and renders a line chart)
   ```
   


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