rahulsmahadev opened a new pull request #26171: [SPARK-29494][SQL] Fix for 
ArrayOutofBoundsException while converting string to timestamp (2.4)
URL: https://github.com/apache/spark/pull/26171
 
 
   What changes were proposed in this pull request?
   Adding an additional check in stringToTimestamp to handle cases where the 
input has trailing ':'
   Added a test to make sure this works.
   Why are the changes needed?
   In a couple of scenarios while converting from String to Timestamp 
DateTimeUtils.stringToTimestamp throws an array out of bounds exception if 
there is trailing ':'. The behavior of this method requires it to return None 
in case the format of the string is incorrect.
   
   Does this PR introduce any user-facing change?
   No
   
   How was this patch tested?
   Added a test in the DateTimeTestUtils suite to test if my fix works

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to