rusackas opened a new pull request, #42734:
URL: https://github.com/apache/superset/pull/42734
### SUMMARY
Adds a regression test for #34748, which reports that a Deck.gl GeoJSON
chart only ever renders a single feature on the map, no matter how many rows
the query returns (the reporter found that capping the row limit to 1 made no
visible difference).
Traced the pipeline: `Geojson/transformProps.ts` maps every row in
`queriesData[0].data` into its own parsed Feature (`records.map(...)`), and
`Geojson.tsx`'s `recurseGeoJson` correctly walks the resulting `{ features:
[...] }` object, pushing every feature it finds. This looks like it was fixed
by the frontend refactor in #39906, which moved GeoJSON row parsing out of the
legacy backend `viz.py` `DeckGeoJson.get_properties` path (what the reporters,
on 5.0.0/6.0.0, were most likely hitting) and into this per-row frontend
transform.
The new test feeds `transformProps` a 3-row payload, each row a distinct
GeoJSON `Feature` string, and asserts all 3 come out the other end. It passes
on current `master`, proving the bug is already fixed.
### TESTING INSTRUCTIONS
```
cd superset-frontend
npm run test --
plugins/preset-chart-deckgl/src/layers/Geojson/transformProps.test.ts
```
### ADDITIONAL INFORMATION
- [x] Has associated issue: Closes #34748
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
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]