[ https://issues.apache.org/jira/browse/FLINK-16823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17071511#comment-17071511 ]
Zhenghua Gao commented on FLINK-16823: -------------------------------------- After talk with [~danny0405], we decide to introduce addMonths/subtractMonths as a temporary solution on Flink side to fix this corner case before CALCITE-3881 is fixed. > The functioin TIMESTAMPDIFF doesn't perform expected result > ----------------------------------------------------------- > > Key: FLINK-16823 > URL: https://issues.apache.org/jira/browse/FLINK-16823 > Project: Flink > Issue Type: Bug > Components: Table SQL / Planner > Affects Versions: 1.9.1, 1.10.0 > Reporter: Adam N D DENG > Assignee: Zhenghua Gao > Priority: Major > Labels: pull-request-available > Attachments: image-2020-03-27-13-50-51-955.png > > Time Spent: 10m > Remaining Estimate: 0h > > For example, > In mysql bellow sql get result 6, but in flink the output is 5 > SELECT timestampdiff (MONTH, TIMESTAMP '2019-09-01 00:00:00',TIMESTAMP > '2020-03-01 00:00:00' ) > > !image-2020-03-27-13-50-51-955.png! > > -- This message was sent by Atlassian Jira (v8.3.4#803005)