SEPURI-SAI-KRISHNA opened a new pull request, #45456:
URL: https://github.com/apache/superset/pull/45456

   ### SUMMARY
   
   Fixes #45455.
   
   `apply_client_processing` looks the chart's `viz_type` up in 
`post_processors`
   and returns the payload untouched when it is not there, so an AG Grid Table
   report went out with raw numbers while the chart showed formatted ones.
   
   The AG Grid Table plugin's column-meta block and `formatColumnValue` are the
   Table plugin's, same column config keys and same rules, so it is registered
   against the same `table` post-processor rather than getting a copy. This 
matches
   what `form_data_query_context` already does for the pair:
   `if effective_viz in {"table", "ag-grid-table"}`.
   
   Anything specific to the AG Grid plugin would be a follow-up; this closes the
   gap where the viz type gets no processing at all.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   The same payload and the same `column_config` of
   `{"SUM(amount)": {"d3NumberFormat": ",.2f"}}`, changing only the viz type:
   
   Before:
   
   ```
   viz_type=table          -> {'SUM(amount)': {0: '1,234,567.00', 1: '42.00'}}
   viz_type=ag-grid-table  -> {'SUM(amount)': {0: 1234567.0, 1: 42.0}}
   ```
   
   After: both render `'1,234,567.00'` and `'42.00'`.
   
   ### TESTING INSTRUCTIONS
   
   ```
   pytest tests/unit_tests/charts/test_client_processing.py -k ag_grid
   ```
   
   ### ADDITIONAL INFORMATION
   
   - [x] Has associated issue: #45455
   - [x] Required feature flags: `AG_GRID_TABLE_ENABLED` (to reach the viz type 
at all)
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] 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]

Reply via email to