iabhi4 commented on issue #46683:
URL: https://github.com/apache/arrow/issues/46683#issuecomment-2942256709

   @pitrou That makes sense, `utf8_lpad` does match Python’s `zfill` behavior 
but we are still missing an edge case here. If the string has signs like` '-1'` 
 or `'+1'` and we do `pc.utf8_lpad(['-1'], 4, '0')`, This produces `'00-1'` 
which doesn't match Python's `'-001'`
   
   `lpad` treats signs as just another character which is not the case with 
`zfill` (it preserves the sign and starts padding after that)
   
   Would you recommend layering custom logic on top of `utf8_lpad` to mimic 
this behavior, or would it make sense to consider a dedicated utf8_zfill kernel 
that natively supports Python-style sign handling. That would save us a lot of 
overhead imo, curious to hear your thoughts


-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to