tsreaper opened a new pull request #16619:
URL: https://github.com/apache/flink/pull/16619


   (This PR is cherry-picked from #16462.)
   
   ## What is the purpose of the change
   
   Currently when comparing temporal type with invalid string literal, 
NullPointerException will be thrown as we'll first cast the string literal to 
the desired temporal type, resulting in a null value.
   
   This PR fixes this issue.
   
   In this PR, when the string literal is not in a valid date/time/timestamp 
format, an exception with message "String xxx is not a valid 
date/time/timestamp" will be thrown, otherwise the comparison code will be 
generated as normal.
   
   The comparison result will be null if either operand is null, and will be 
true/false if both operands are not null.
   
   ## Brief change log
   
    - Fix NullPointerException when comparing temporal type with invalid string 
literal
   
   ## Verifying this change
   
   This change added tests and can be verified by running the added tests.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): no
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
     - The serializers: no
     - The runtime per-record code paths (performance sensitive): no
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
     - The S3 file system connector: no
   
   ## Documentation
   
     - Does this pull request introduce a new feature? no
     - If yes, how is the feature documented? not applicable
   


-- 
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: issues-unsubscr...@flink.apache.org

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


Reply via email to