twalthr commented on a change in pull request #17522: URL: https://github.com/apache/flink/pull/17522#discussion_r738188359
########## File path: flink-table/flink-table-planner/src/test/scala/org/apache/flink/table/planner/expressions/TemporalTypesTest.scala ########## @@ -470,196 +470,196 @@ class TemporalTypesTest extends ExpressionTestBase { @Test def testTimeIntervalArithmetic(): Unit = { - - // interval months comparison - - testAllApis( - 12.months < 24.months, - "INTERVAL '12' MONTH < INTERVAL '24' MONTH", - "true") - - testAllApis( - 8.years === 8.years, - "INTERVAL '8' YEAR = INTERVAL '8' YEAR", - "true") - - // interval millis comparison - - testAllApis( - 8.millis > 10.millis, - "INTERVAL '0.008' SECOND > INTERVAL '0.010' SECOND", - "false") - - testAllApis( - 8.millis === 8.millis, - "INTERVAL '0.008' SECOND = INTERVAL '0.008' SECOND", - "true") - - // interval months addition/subtraction - - testAllApis( - 8.years + 10.months, - "INTERVAL '8' YEAR + INTERVAL '10' MONTH", - "+8-10") - - testAllApis( - 2.years - 12.months, - "INTERVAL '2' YEAR - INTERVAL '12' MONTH", - "+1-00") - - testAllApis( - -2.years, - "-INTERVAL '2' YEAR", - "-2-00") - - // interval millis addition/subtraction - - testAllApis( - 8.hours + 10.minutes + 12.seconds + 5.millis, - "INTERVAL '8' HOUR + INTERVAL '10' MINUTE + INTERVAL '12.005' SECOND", - "+0 08:10:12.005") - - testAllApis( - 1.minute - 10.seconds, - "INTERVAL '1' MINUTE - INTERVAL '10' SECOND", - "+0 00:00:50.000") - - testAllApis( - -10.seconds, - "-INTERVAL '10' SECOND", - "-0 00:00:10.000") - - // addition to date - - // interval millis - testAllApis( - 'f0 + 2.days, - "f0 + INTERVAL '2' DAY", - "1990-10-16") - - // interval millis - testAllApis( - 30.days + 'f0, - "INTERVAL '30' DAY + f0", - "1990-11-13") - - // interval months - testAllApis( - 'f0 + 2.months, - "f0 + INTERVAL '2' MONTH", - "1990-12-14") - - // interval months - testAllApis( - 2.months + 'f0, - "INTERVAL '2' MONTH + f0", - "1990-12-14") - - // addition to time - - // interval millis - testAllApis( - 'f1 + 12.hours, - "f1 + INTERVAL '12' HOUR", - "22:20:45") - - // interval millis - testAllApis( - 12.hours + 'f1, - "INTERVAL '12' HOUR + f1", - "22:20:45") - - // addition to timestamp - - // interval millis - testAllApis( - 'f2 + 10.days + 4.millis, - "f2 + INTERVAL '10 00:00:00.004' DAY TO SECOND", - "1990-10-24 10:20:45.127") - - // interval millis - testAllApis( - 10.days + 'f2 + 4.millis, - "INTERVAL '10 00:00:00.004' DAY TO SECOND + f2", - "1990-10-24 10:20:45.127") - - // interval months - testAllApis( - 'f2 + 10.years, - "f2 + INTERVAL '10' YEAR", - "2000-10-14 10:20:45.123") - - // interval months - testAllApis( - 10.years + 'f2, - "INTERVAL '10' YEAR + f2", - "2000-10-14 10:20:45.123") - - // subtraction from date - - // interval millis - testAllApis( - 'f0 - 2.days, - "f0 - INTERVAL '2' DAY", - "1990-10-12") - - // interval millis - testAllApis( - -30.days + 'f0, - "INTERVAL '-30' DAY + f0", - "1990-09-14") - - // interval months - testAllApis( - 'f0 - 2.months, - "f0 - INTERVAL '2' MONTH", - "1990-08-14") - - // interval months - testAllApis( - -2.months + 'f0, - "-INTERVAL '2' MONTH + f0", - "1990-08-14") - - // subtraction from time - - // interval millis - testAllApis( - 'f1 - 12.hours, - "f1 - INTERVAL '12' HOUR", - "22:20:45") - - // interval millis - testAllApis( - -12.hours + 'f1, - "INTERVAL '-12' HOUR + f1", - "22:20:45") - - // subtraction from timestamp - - // interval millis - testAllApis( - 'f2 - 10.days - 4.millis, - "f2 - INTERVAL '10 00:00:00.004' DAY TO SECOND", - "1990-10-04 10:20:45.119") - - // interval millis - testAllApis( - -10.days + 'f2 - 4.millis, - "INTERVAL '-10 00:00:00.004' DAY TO SECOND + f2", - "1990-10-04 10:20:45.119") - - // interval months - testAllApis( - 'f2 - 10.years, - "f2 - INTERVAL '10' YEAR", - "1980-10-14 10:20:45.123") - - // interval months - testAllApis( - -10.years + 'f2, - "INTERVAL '-10' YEAR + f2", - "1980-10-14 10:20:45.123") +// Review comment: undo this change? -- 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