Arawoof06 commented on PR #50540:
URL: https://github.com/apache/arrow/pull/50540#issuecomment-6342909992

   I went through #51755. Its 42-byte bound is right for 
`StringFormatter<Date64Type>` as it stands (21 for the prefix, up to 20 digits, 
1 for the closing `>`), so both PRs close the overflow. The difference is that 
#51755 still keeps a hand-picked constant that has to track the formatter's 
output. Here the block is allocated inside the callback from the actual 
formatted size, so allocation and copy can't drift apart. The float macro gets 
the same treatment, and a normal date only allocates the 10 bytes it writes.
   
   Going with the exact sizing here, as you suggested. @Nayana-Naik73, your 
`9000000000000000` case is already covered by the out-of-range path in 
`TestCastVARCHARFromMillisecondsLongOutput`, so nothing from #51755 should get 
lost.


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

Reply via email to