bito-code-review[bot] commented on PR #42591:
URL: https://github.com/apache/superset/pull/42591#issuecomment-5124564716

   <!-- Bito Reply -->
   The flagged issue is correct. When `line_column` is set to `polygon`, the 
current implementation overwrites the raw boundary value with the parsed 
geometry array, which breaks downstream features like table-filter selection 
and tooltips that expect the original boundary value.
   
   To resolve this, you should preserve the original boundary value in a 
separate property (e.g., `raw_polygon`) or ensure the feature object retains 
the original value alongside the parsed geometry. Here is a suggested update to 
the test to verify this contract:
   
   ```typescript
       // ... existing test setup
       const result = transformProps(collidingColumnNameProps as ChartProps);
       const features = result.payload.data.features as PolygonFeature[];
   
       expect(features).toHaveLength(1);
       // Verify parsed geometry
       expect(features[0]?.polygon).toEqual([...]);
       // Verify original boundary value is preserved
       expect(features[0]?.raw_polygon).toBeDefined();
       expect(features[0]?.raw_polygon).toBe(JSON.stringify([...]));
   ```
   
   I have checked the PR comments, and there are no other comments to address. 
Would you like me to help you implement the corresponding fix in the 
`transformProps` function?
   
   
**superset-frontend/plugins/preset-chart-deckgl/src/layers/Polygon/transformProps.test.ts**
   ```
   // Verify parsed geometry
       expect(features[0]?.polygon).toEqual([...]);
       // Verify original boundary value is preserved
       expect(features[0]?.raw_polygon).toBeDefined();
       expect(features[0]?.raw_polygon).toBe(JSON.stringify([...]));
   ```


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

Reply via email to