tsreaper commented on a change in pull request #17569:
URL: https://github.com/apache/flink/pull/17569#discussion_r741678752



##########
File path: 
flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala
##########
@@ -890,14 +890,24 @@ class TemporalTypesTest extends ExpressionTestBase {
     testSqlApi("FLOOR( DATE '2021-03-01' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-02-27' TO WEEK)", "2021-02-28")
     testSqlApi("CEIL( DATE '2021-03-01' TO WEEK)", "2021-03-07")
-
+    testSqlApi("CEIL(DATE '2018-01-02' TO DECADE)", "2020-01-01")
+    testSqlApi("CEIL(DATE '2018-03-27' TO CENTURY)", "2101-01-01")

Review comment:
       The expected results are from postgre and vertica. See description of 
FLINK-24648.
   
   From document of postgre:
   > The first century starts at 0001-01-01 00:00:00 AD, although they did not 
know it at the time. This definition applies to all Gregorian calendar 
countries. There is no century number 0, you go from -1 century to 1 century. 
If you disagree with this, please write your complaint to: Pope, Cathedral 
Saint-Peter of Roma, Vatican.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to