docete opened a new pull request #11654: [FLINK-16632][table-planner-blink] Fix 
SqlDateTimeUtils#toSqlTimestam…
URL: https://github.com/apache/flink/pull/11654
 
 
   …p(String, String) may yield incorrect result
   
   
   ## What is the purpose of the change
   
   `SqlDateTimeUtils#toSqlTimestamp(String, String)` may yield incorrect 
result. Which cause:
   
   1) cast STRING to TIMESTAMP yields incompatible result. 
   The original result comes from `DateTimeUtils#timestampStringToUnixDate` 
which supports special cases like '1999-9-10 05:20:10' or '1999-9-10'.
   
   2) TO_TIMESTAMP yields incorrect result.
   The original result comes from `SqlDateTimeUtils#toTimestamp(String, String, 
TimeZone)` which follows rules of completion of java.text.SimpleDateFormat
   
   This PR fix that.
   
   ## Brief change log
   - 11a9a2f Fix SqlDateTimeUtils#toSqlTimestamp(String, String) may yield 
incorrect result
   
   ## Verifying this change
   
   This change added tests.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (yes / **no**)
     - The serializers: (yes / **no** / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** 
/ don't know)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (**yes** / no)
     - If yes, how is the feature documented? (not applicable / docs / 
**JavaDocs** / not documented)
   

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

Reply via email to