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

   <!-- Bito Reply -->
   The flagged issue is correct. The current implementation of 
`toDateFormatterInput` in 
`superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.tsx`
 was overly aggressive in coercing numeric strings to numbers, which caused 
short date keys (like YYYYMMDD) to be incorrectly treated as epoch timestamps.
   
   The fix implemented in the PR (as seen in the diff) correctly updates 
`toDateFormatterInput` to only coerce strings that are at least 10 digits long, 
which is the minimum length to plausibly represent an epoch timestamp in 
milliseconds. This ensures that shorter numeric strings, such as date keys, are 
passed through as strings and handled correctly by the shared 
`stringifyTimeInput` utility.
   
   Since the fix is already present in the provided PR diff, no further action 
is required for this specific issue. I have checked the PR comments, and there 
are no other pending review comments to address.
   
   
**superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/TableRenderers.tsx**
   ```
   const toDateFormatterInput = (value: unknown): unknown =>
     typeof value === 'string' && /^-?\d{10,}$/.test(value.trim())
   ```


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