raphaelsales commented on issue #34328:
URL: https://github.com/apache/superset/issues/34328#issuecomment-5533589925

   Reproduced on master (`3258f5fa3f`). There are two paths, and both end in 
the same place: a d3 time formatter applied to a value that is not a parseable 
timestamp. An `Invalid Date` formatted with, say, `%H:%M:%S` renders as 
`NaN:NaN:NaN`.
   
   **Path A — column typed TEMPORAL.** `transformProps` wraps the cell in 
`DateWithFormatter`, and `formatValue` hands that object straight to the 
formatter. The original value is retained in `this.input` and discarded.
   
   **Path B — column typed STRING, with a d3 time format set in the column 
config.** `transformProps` assigns a time formatter anyway (`isTime || 
config.d3TimeFormat`), and `stringifyTimeInput` builds an `Invalid Date` from 
the string.
   
   Both paths converge in `stringifyTimeInput`, which formats whatever `Date` 
it ends up with, valid or not.
   
   @rusackas, to your question about which path is actually being hit: path B 
would explain @SukiSeven's follow-up — still `NaN:NaN:NaN` after the column was 
changed to `varchar` — since that format is configured on the chart, not on the 
dataset typing. Path A is the one that reproduces from the dataset side.
   
   Both reproduce with `00:01:54` and `0 days 00:01:54`. Opening a PR that 
falls back to the original value in both paths.
   


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