hi, Sergey,
I tried on my local mysql query `select timestampadd(YEAR,-1000,'2017-11-29 22:58:58.998');` it looks that the result of mysql is "1017-11-29 22:58:58.998000". I don't know why the results of us are different... Maybe I could not answer your question, however there are some other info about time in flink you could refer. One is that flink should support time zone [1] and it seems that flink has julian process function [2] Thanks [1] https://issues.apache.org/jira/browse/FLINK-8353?jql=project%20%3D%20FLINK%20AND%20resolution%20%3D%20Unresolved%20AND%20creator%20in%20(twalthr)%20ORDER%20BY%20priority%20DESC%2C%20updated%20DESC [2] https://github.com/apache/flink/blob/master/flink-libraries/flink-table/src/main/java/org/apache/calcite/avatica/util/DateTimeUtils.java#L365 ------------------ ???????? ------------------ ??????: "Sergey Nuyanzin"<snuyan...@gmail.com>; ????????: 2018??8??26??(??????) ????7:19 ??????: "dev"<dev@flink.apache.org>; ????: Flink tableApi/sql calendar Hello, I have just faced with a question: what calendar is used by Flink tableAPI/sql? For instance there was a TIMESTAMPADD related issue [1] with references to MySql documentation. However there are some contradictions like: from one side there is a testTimestampAdd[2] in Flink which expects 1017-11-29 after adding -1000 years. From the other side there is MySql documentation about their calendar [3] and result of the same query 1017-12-05T22:58:58.998 vs expected by Flink's test 2017-11-29 22:58:58.998 Should it be treated as an issue or just another calendar usage (without Gregorian cutover e.g.)? [1] https://issues.apache.org/jira/browse/FLINK-6811 [2] https://github.com/apache/flink/blob/505dca174128ebb3bf765778ee36d58f680d6a1e/flink-libraries/flink-table/src/test/scala/org/apache/flink/table/expressions/ScalarFunctionsTest.scala#L2166 [3] https://dev.mysql.com/doc/refman/5.5/en/mysql-calendar.html Best regards, Sergey