SEPURI-SAI-KRISHNA commented on PR #45456:
URL: https://github.com/apache/superset/pull/45456#issuecomment-6271351417

   The gap is real, but it is not introduced here and it is not specific to AG 
Grid.
   
   `plugin-chart-table/src/transformProps.ts` has the same machinery this 
comment describes: `getComparisonColConfig(t('Main'), col.key, columnConfig)` 
and the `#`, `△`, `%` variants, at lines 424 to 469. So an exact-label lookup 
in `table` misses comparison columns for `viz_type: "table"` exactly as it 
would for `ag-grid-table`. On master, with `column_config` set to 
`{"SUM(amount)": {"d3NumberFormat": ",.2f"}}` and a `1 week ago` comparison:
   
   ```
   viz_type=table  ->  "SUM(amount)": "1,234,567.00",  "SUM(amount)__1 week 
ago": 1000000.0
   ```
   
   The parent metric is formatted, the offset column is not. This PR gives AG 
Grid that same behaviour, where it previously had no formatting at all, so 
nothing regresses and nothing new breaks.
   
   It is also more than a lookup problem, which is why I would rather not widen 
the lookup here and call it done. The report payload carries `<metric>` and 
`<metric>__<offset>`; the `Main `, `# `, `△ ` and `% ` columns do not exist in 
it, because the browser derives them in `transformDataRecords` from those two. 
`superset/charts/client_processing.py` has no comparison handling at all, so a 
table report of a comparison chart shows a different set of columns from the 
chart regardless of formatting. Matching the browser means porting that 
derivation to the report path, for both viz types.
   
   That is a separate defect with a separate fix, and I am filing it on its own 
rather than growing a viz-type registration into it.
   


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