rusackas opened a new pull request, #42591:
URL: https://github.com/apache/superset/pull/42591
### SUMMARY
This is a **test-only PR** opened as a TDD-style validation of issue #33669.
#33669 (filed 2025-06) reports that deck.gl **Polygon** charts break when
the dataset column supplying the polygon geometry is itself named `polygon`
(case-insensitive), presumably a naming collision with the internal `polygon`
key the transform builds on each feature. The issue thread includes a prior
maintainer test against the wrong chart type (deck.gl GeoJSON, not Polygon),
which the reporter corrected.
This PR adds one regression test on `preset-chart-deckgl`'s Polygon
`transformProps`:
1. **`should correctly parse polygon geometry when the boundary column is
itself named "polygon"`** — sets `line_column: 'polygon'` (matching the exact
reported column name) with a raw record `{ polygon: <JSON-encoded coordinates>
}`, and asserts the resulting feature's `polygon` key resolves to the correctly
parsed coordinate array rather than the raw string or being dropped.
### How to interpret CI
- **CI green** → the collision doesn't reproduce against current `master`.
`processPolygonData` in `transformProps.ts` excludes `line_column` before
spreading a record's other properties onto the feature object, and assigns the
parsed `polygon` key last in the returned object literal, so it always wins
regardless of the raw column's name. Merging this PR closes #33669 as already
fixed (or the collision this specific mechanism guards against was never
actually reachable in this exact form).
- **CI red** → the bug is real; likely fix location is `processPolygonData`
in
`superset-frontend/plugins/preset-chart-deckgl/src/layers/Polygon/transformProps.ts`.
Ran locally: 17/17 tests pass (16 pre-existing + this one), including full
pre-commit (prettier, oxlint, custom-rules, stylelint, type-checking).
### TESTING INSTRUCTIONS
```bash
cd superset-frontend
npx jest
plugins/preset-chart-deckgl/src/layers/Polygon/transformProps.test.ts -v
```
### ADDITIONAL INFORMATION
- [x] Has associated issue: closes #33669
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]