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

   <!-- Bito Reply -->
   The review comment is correct. The current regression test only verifies 
that the function does not throw an error when encountering a `BigInt` value, 
but it does not verify that the resulting `totalStackedValues` and 
`thresholdValues` are calculated correctly. To resolve this, you should assert 
the expected values in the test case.
   
   Here is the updated test case:
   
   ```typescript
     test('does not throw and calculates correct totals when a stacked datum 
contains a BigInt metric value', () => {
       const data: DataRecord[] = [
         {
           __timestamp: '2000-01-01',
           metric_a: 10,
           metric_b: BigInt('9007199254740993'),
         },
       ];
       const { totalStackedValues, thresholdValues } = 
extractDataTotalValues(data, {
         stack: true,
         percentageThreshold: 50,
         xAxisCol: '__timestamp',
       });
       expect(totalStackedValues).toEqual([BigInt('9007199254741003')]);
       expect(thresholdValues).toEqual([BigInt('4503599627370501.5')]);
     });
   ```
   
   I have checked the PR comments, and there are no other comments to address. 
Would you like me to check for any other issues in the PR?
   
   **superset-frontend/plugins/plugin-chart-echarts/test/utils/series.test.ts**
   ```
   test('does not throw and calculates correct totals when a stacked datum 
contains a BigInt metric value', () => {
       const data: DataRecord[] = [
         {
           __timestamp: '2000-01-01',
           metric_a: 10,
           metric_b: BigInt('9007199254740993'),
         },
       ];
       const { totalStackedValues, thresholdValues } = 
extractDataTotalValues(data, {
         stack: true,
         percentageThreshold: 50,
         xAxisCol: '__timestamp',
       });
       expect(totalStackedValues).toEqual([BigInt('9007199254741003')]);
       expect(thresholdValues).toEqual([BigInt('4503599627370501.5')]);
     });
   ```


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