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

   <!-- Bito Reply -->
   The flagged issue is correct. The current implementation of 
`_select_arithmetic_columns` correctly identifies numeric and Decimal columns, 
but the `contribution` function does not pass these columns to the 
`contribution_totals` path, causing Decimal metrics to be omitted from totals 
and resulting in zero values.
   
   To resolve this, you should ensure that the `contribution_totals` 
calculation includes the Decimal columns identified by 
`_select_arithmetic_columns`. You can modify the `contribution` function to 
pass the filtered `numeric_df` to the totals calculation.
   
   Would you like me to fetch all other comments on this PR to validate and 
implement fixes for them as well?
   
   **superset/utils/pandas_postprocessing/contribution.py**
   ```
   numeric_df = _select_arithmetic_columns(contribution_df).fillna(0)
       # Ensure Decimal columns are included in totals calculation
       totals = contribution_totals(contribution_df, numeric_df, columns, 
orientation)
       # ... rest of the function
   ```


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