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

   ### What happened?
   
   `attributeTypeRules` maps a property name to the column types that property 
accepts. The operator form looks each key up as a property — 
`findAttributeType(propertyName)` in 
`operator-property-edit-frame.component.ts` returns `undefined` when 
`mapSource.properties[propertyName]` is absent, and `checkConstraint` then 
returns immediately. So a key that names no property is not an error: the rule 
is simply skipped, with no warning anywhere.
   
   Comparing each operator's generated schema against the property names 
declared in that same schema:
   
   | Operator | `attributeTypeRules` keys | Properties actually declared |
   | --- | --- | --- |
   | `LineChartOpDesc` (in `LineConfig`) | `yValue`, `xValue` | `y`, `x`, 
`mode`, `name`, `color` |
   | `ScatterMatrixChartOpDesc` | `value` | `Selected Attributes`, `Color` |
   | `Scatter3dChartOpDesc` | `title` | `x`, `y`, `z` |
   | `FunnelPlotOpDesc` | `title` | `x`, `y`, `color` |
   
   None of the four keys matches a declared property, so all four rules are 
dead:
   
   - `LineConfig` used the Scala field names rather than the `@JsonProperty` 
names, so a line's x and y axes accept string columns despite the declared 
`["integer","long","double"]`. `BandConfig`, which extends it, inherits the 
same dead rule.
   - `ScatterMatrixChartOpDesc` names `value` where the property is `Selected 
Attributes`, so the matrix dimensions are unconstrained.
   - `Scatter3dChartOpDesc` and `FunnelPlotOpDesc` constrain `title`, which 
neither operator has. Their value is also the bare string `"string"` rather 
than an object such as `{"enum": [...]}`, so even under a correct key 
`constraint.enum` / `const` / `allOf` would all be undefined and the check 
would still no-op.
   
   Expected: a declared type constraint applies, or fails the build if it 
cannot.
   
   Worth adding alongside the four fixes: a check when the schema is generated 
that every `attributeTypeRules` key names a declared property. These four went 
unnoticed because nothing reports them — the same mistake will otherwise recur.
   
   ### How to reproduce?
   
   1. Drop a Line Chart onto the canvas and connect a source carrying both 
numeric and string columns.
   2. Set a line's Value X or Value Y to a string column — it is accepted, and 
no type warning appears.
   3. Compare with an operator whose rule key is correct, e.g. ECDF Plot's 
Value Column, which does warn.
   
   ### Version/Branch
   
   1.3.0-incubating-SNAPSHOT (main)
   
   ### Relevant log output
   
   ```shell
   (no error is produced — the rule is skipped silently)
   ```
   


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