MaxGekk opened a new pull request #25097: [SPARK-28015][SQL] Check 
stringToDate() consumes entire input for the yyyy and yyyy-[m]m formats
URL: https://github.com/apache/spark/pull/25097
 
 
   ## What changes were proposed in this pull request?
   
   Fix `stringToDate()` for the formats `yyyy` and `yyyy-[m]m` that assumes 
there are no additional chars after the last components `yyyy` and `[m]m`. In 
the PR, I propose to check that entire input was consumed for the formats.
   
   After the fix, the input `1999 08 01` will be invalid because it matches to 
the pattern `yyyy` but the strings contains additional chars ` 08 01`.
   
   ## How was this patch tested?
   
   Added new checks to `DateTimeUtilsSuite` for the `1999 08 01` and `1999 08` 
inputs.
   

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