sadpandajoe commented on code in PR #42594:
URL: https://github.com/apache/superset/pull/42594#discussion_r3697413673


##########
superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts:
##########
@@ -434,7 +434,14 @@ export function extractDataTotalValues(
           return prev;
         }
         const value = datum[curr] || 0;
-        return prev + (value as number);
+        // Query results with integers beyond Number.MAX_SAFE_INTEGER are
+        // parsed as native BigInt (see
+        // packages/superset-ui-core/src/connection/callApi/parseResponse.ts).
+        // Normalize to Number before summing so BigInt and Number values
+        // can be combined without throwing (see #36401).
+        const numericValue =
+          typeof value === 'bigint' ? Number(value) : (value as number);

Review Comment:
   This only normalizes the temporary accumulator value, so contribution-mode 
stacks still reach `extractSeries` with the original BigInt and throw when it 
divides that value by the numeric total. Could we normalize the series datum 
too and cover the expanded-stack path?



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