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

   ### What happened?
   
   `attributeTypeRules` is how an operator states which column types a picker 
accepts: the property editor resolves the selected column's declared 
`AttributeType` and warns before the run. Upstream already uses it wherever a 
chart consumes a column as a quantity — Bar Chart, Pie Chart, Hierarchy Chart, 
Icicle Chart, ECDF Plot, Dumbbell Plot, Radar Chart, Radar Plot, Range Slider 
and Quiver Plot all constrain their value fields, and Gantt Chart constrains 
its two ends to `timestamp`.
   
   Twelve pickers across ten operators consume their column the same way but 
declare no rule at all, so the form offers every column and accepts a string 
one. Generating each operator's module from `main` and executing it against a 
six-row frame whose selected column is a STRING attribute:
   
   | Operator | Column | Result |
   | --- | --- | --- |
   | Contour Plot | `x` / `y` / `z` | run fails — `DTypePromotionError` from 
numpy |
   | Dendrogram | `xVal` / `yVal` | run fails — `ValueError: Unsupported dtype 
object` |
   | Ternary Contour | first / second / third variable | run fails — 
`TypeError: '>=' not supported between instances of 'str' and 'int'` |
   | Volcano Plot | `pvalueColumn` | run fails — `TypeError: '>' not supported 
between instances of 'str' and 'int'` |
   | Parallel Coordinates | `color` | run fails — plotly `ValueError: Invalid 
element(s) received for the 'color' property of parcoords.line` |
   | Waterfall Chart | `yColumn` | run fails — `ValueError: Sign not allowed in 
string format specifier`, from `text=[f"{v:+}" for v in y_values]` |
   | Bullet Chart | `value` | error page — `Bullet chart is not available` |
   | Carpet Plot | `a` / `b` / `y` | error page — `Error converting input 
columns to numeric values` |
   | Polar Chart | `r` / `theta` | error page — `Selected columns must be 
numeric` |
   | Time Series | `timeColumn` | error page — `Table became empty after 
filtering`, which never says the column was not a time column: 
`pd.to_datetime(..., errors='coerce')` turned every row into NaT and the dropna 
that follows emptied the table |
   | Ternary Plot | first / second / third variable | **renders** — a ternary 
axis is a proportion, and the chart is drawn from text |
   | Time Series | `valueColumn` | **renders** — the y axis degenerates into a 
categorical one |
   
   The last two are the ones a user cannot discover: the operator succeeds and 
the chart looks finished. Polar Chart sits at the other end and is worth 
singling out — it already checks `np.issubdtype(..., np.number)` and renders a 
message, so the operator has decided the column must be numeric and only the 
form does not know.
   
   Expected: a picker whose chart consumes the column as a quantity, or as an 
instant, says so — the way the operators listed above already do.
   
   Related but distinct: #7210 covers four rules that exist but name a property 
that does not, so they are skipped silently. The twelve here have no rule to 
skip.
   
   ### How to reproduce?
   
   1. Chain a source carrying both numeric and string columns into Waterfall 
Chart.
   2. Set X Axis Values to any column and Y Axis Values to a string column — 
both are offered, and no type warning appears.
   3. Run; the operator fails with the first error below. Compare with Bar 
Chart, whose Value field refuses the same column in the form.
   
   ### Version/Branch
   
   1.3.0-incubating-SNAPSHOT (main)
   
   ### Relevant log output
   
   ```shell
   ValueError: Sign not allowed in string format specifier                      
      (Waterfall Chart, yColumn)
   numpy.exceptions.DTypePromotionError: The DType <class 
'numpy.dtypes._PyFloatDType'> could not be promoted   (Contour Plot, x)
   ValueError: Unsupported dtype object                                         
      (Dendrogram, xVal)
   TypeError: '>=' not supported between instances of 'str' and 'int'           
      (Ternary Contour, first variable)
   TypeError: '>' not supported between instances of 'str' and 'int'            
      (Volcano Plot, pvalueColumn)
   ValueError: Invalid element(s) received for the 'color' property of 
parcoords.line (Parallel Coordinates, color)
   
   (Ternary Plot and Time Series' valueColumn produce no error at all — the 
chart renders)
   ```
   


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