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

   ### What happened?
   
   Both `QuiverPlotOpDesc` and `RangeSliderOpDesc` carry a class-level 
`@JsonSchemaInject` `attributeTypeRules` block that constrains a field named 
**`value`** to numeric types — but neither operator has a `value` field, so the 
rule matches nothing and **no type constraint is applied**. The frontend column 
pickers therefore allow columns of any type for fields the operator can only 
handle as numeric, which fails at runtime.
   
   **QuiverPlot** — `common/.../visualization/quiverPlot/QuiverPlotOpDesc.scala`
   
   ```json
   "attributeTypeRules": { "value": { "enum": ["integer", "long", "double"] } }
   ```
   
   Its fields are `x`, `y`, `u`, `v` (all required, no `value`). All four are 
used as numeric vector coordinates in `ff.create_quiver(x, y, u, v)`, so all 
four should be numeric.
   
   **RangeSlider** — 
`common/.../visualization/rangeSlider/RangeSliderOpDesc.scala`
   
   ```json
   "attributeTypeRules": { "value": { "enum": ["integer", "long", "double"] } }
   ```
   
   Its fields are `Y-axis` and `X-axis` (no `value`). The y-axis column is 
aggregated (`groupby(X-axis)[Y-axis].mean()/.sum()`), so it must be numeric; 
the x-axis is only a grouping key and can be any type.
   
   **Expected:** the numeric fields (QuiverPlot `x`/`y`/`u`/`v`; RangeSlider 
`Y-axis`) are constrained to numeric columns, as clearly intended by the 
(mistargeted) rule.
   
   ### How to reproduce?
   
   **A — user-facing:** In a Quiver Plot (or Range Slider), the column pickers 
for the numeric fields let you pick a string column; selecting one then fails 
at chart time instead of being prevented up front.
   
   **B — confirmed against `main`:** in both files the `attributeTypeRules` key 
is `"value"`, but neither operator declares a `value` field (QuiverPlot: 
`x`/`y`/`u`/`v`; RangeSlider: `Y-axis`/`X-axis`), so the rule is inert and no 
type constraint is applied.
   
   **Proposed fix:** retarget each rule to the real field name(s) (keys match 
the `@JsonProperty` name):
   
   - QuiverPlot: `"x"`, `"y"`, `"u"`, `"v"` → numeric
   - RangeSlider: `"Y-axis"` → numeric
   
   ### Version/Branch
   
   1.3.0-incubating-SNAPSHOT (main)
   
   ### Commit Hash (Optional)
   
   _No response_
   
   ### What browsers are you seeing the problem on?
   
   _No response_
   
   ### Relevant log output
   
   ```shell
   
   ```
   


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