diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/interval/TestIntervalDayTime.java b/core/trino-main/src/test/java/io/trino/operator/scalar/interval/TestIntervalDayTime.java index f549751b8c553..9e74e2e353564 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/interval/TestIntervalDayTime.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/interval/TestIntervalDayTime.java @@ -156,61 +156,61 @@ public void testLiterals() // Invalid qualifiers (DAY TO xxx) assertThatThrownBy(assertions.expression("INTERVAL '12' DAY TO DAY")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: DAY to DAY"); + .hasMessage("line 1:12: Invalid interval qualifier: DAY TO DAY"); assertThatThrownBy(assertions.expression("INTERVAL '12-10' DAY TO YEAR")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: DAY to YEAR"); + .hasMessage("line 1:12: Invalid interval qualifier: DAY TO YEAR"); assertThatThrownBy(assertions.expression("INTERVAL '12-10' DAY TO MONTH")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: DAY to MONTH"); + .hasMessage("line 1:12: Invalid interval qualifier: DAY TO MONTH"); // Invalid qualifiers (HOUR TO xxx) assertThatThrownBy(assertions.expression("INTERVAL '10' HOUR TO HOUR")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: HOUR to HOUR"); + .hasMessage("line 1:12: Invalid interval qualifier: HOUR TO HOUR"); assertThatThrownBy(assertions.expression("INTERVAL '12-10' HOUR TO YEAR")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: HOUR to YEAR"); + .hasMessage("line 1:12: Invalid interval qualifier: HOUR TO YEAR"); assertThatThrownBy(assertions.expression("INTERVAL '12-10' HOUR TO MONTH")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: HOUR to MONTH"); + .hasMessage("line 1:12: Invalid interval qualifier: HOUR TO MONTH"); assertThatThrownBy(assertions.expression("INTERVAL '12-10' HOUR TO DAY")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: HOUR to DAY"); + .hasMessage("line 1:12: Invalid interval qualifier: HOUR TO DAY"); // Invalid qualifiers (MINUTE TO xxx) assertThatThrownBy(assertions.expression("INTERVAL '45' MINUTE TO MINUTE")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: MINUTE to MINUTE"); + .hasMessage("line 1:12: Invalid interval qualifier: MINUTE TO MINUTE"); assertThatThrownBy(assertions.expression("INTERVAL '12-10' MINUTE TO YEAR")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: MINUTE to YEAR"); + .hasMessage("line 1:12: Invalid interval qualifier: MINUTE TO YEAR"); assertThatThrownBy(assertions.expression("INTERVAL '12-10' MINUTE TO MONTH")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: MINUTE to MONTH"); + .hasMessage("line 1:12: Invalid interval qualifier: MINUTE TO MONTH"); assertThatThrownBy(assertions.expression("INTERVAL '12-10' MINUTE TO DAY")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: MINUTE to DAY"); + .hasMessage("line 1:12: Invalid interval qualifier: MINUTE TO DAY"); assertThatThrownBy(assertions.expression("INTERVAL '12-10' MINUTE TO HOUR")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: MINUTE to HOUR"); + .hasMessage("line 1:12: Invalid interval qualifier: MINUTE TO HOUR"); // Invalid qualifiers (SECOND TO xxx) assertThatThrownBy(assertions.expression("INTERVAL '32' SECOND TO SECOND")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: SECOND to SECOND"); + .hasMessage("line 1:12: Invalid interval qualifier: SECOND TO SECOND"); assertThatThrownBy(assertions.expression("INTERVAL '12-10' SECOND TO YEAR")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: SECOND to YEAR"); + .hasMessage("line 1:12: Invalid interval qualifier: SECOND TO YEAR"); assertThatThrownBy(assertions.expression("INTERVAL '12-10' SECOND TO MONTH")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: SECOND to MONTH"); + .hasMessage("line 1:12: Invalid interval qualifier: SECOND TO MONTH"); assertThatThrownBy(assertions.expression("INTERVAL '12-10' SECOND TO DAY")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: SECOND to DAY"); + .hasMessage("line 1:12: Invalid interval qualifier: SECOND TO DAY"); assertThatThrownBy(assertions.expression("INTERVAL '12-10' SECOND TO HOUR")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: SECOND to HOUR"); + .hasMessage("line 1:12: Invalid interval qualifier: SECOND TO HOUR"); assertThatThrownBy(assertions.expression("INTERVAL '12-10' SECOND TO MINUTE")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: SECOND to MINUTE"); + .hasMessage("line 1:12: Invalid interval qualifier: SECOND TO MINUTE"); } private static SqlIntervalDayTime interval(int day, int hour, int minute, int second, int milliseconds) diff --git a/core/trino-main/src/test/java/io/trino/operator/scalar/interval/TestIntervalYearMonth.java b/core/trino-main/src/test/java/io/trino/operator/scalar/interval/TestIntervalYearMonth.java index 9a7678f7540a4..6224dd0263aea 100644 --- a/core/trino-main/src/test/java/io/trino/operator/scalar/interval/TestIntervalYearMonth.java +++ b/core/trino-main/src/test/java/io/trino/operator/scalar/interval/TestIntervalYearMonth.java @@ -84,38 +84,38 @@ public void testLiterals() // Invalid qualifiers (YEAR TO xxx) assertThatThrownBy(assertions.expression("INTERVAL '32767' YEAR TO YEAR")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: YEAR to YEAR"); + .hasMessage("line 1:12: Invalid interval qualifier: YEAR TO YEAR"); assertThatThrownBy(assertions.expression("INTERVAL '124-30' YEAR TO DAY")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: YEAR to DAY"); + .hasMessage("line 1:12: Invalid interval qualifier: YEAR TO DAY"); assertThatThrownBy(assertions.expression("INTERVAL '124-30' YEAR TO HOUR")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: YEAR to HOUR"); + .hasMessage("line 1:12: Invalid interval qualifier: YEAR TO HOUR"); assertThatThrownBy(assertions.expression("INTERVAL '124-30' YEAR TO MINUTE")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: YEAR to MINUTE"); + .hasMessage("line 1:12: Invalid interval qualifier: YEAR TO MINUTE"); assertThatThrownBy(assertions.expression("INTERVAL '124-30' YEAR TO SECOND")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: YEAR to SECOND"); + .hasMessage("line 1:12: Invalid interval qualifier: YEAR TO SECOND"); // Invalid qualifiers (MONTH TO xxx) assertThatThrownBy(assertions.expression("INTERVAL '30' MONTH TO MONTH")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: MONTH to MONTH"); + .hasMessage("line 1:12: Invalid interval qualifier: MONTH TO MONTH"); assertThatThrownBy(assertions.expression("INTERVAL '124-30' MONTH TO YEAR")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: MONTH to YEAR"); + .hasMessage("line 1:12: Invalid interval qualifier: MONTH TO YEAR"); assertThatThrownBy(assertions.expression("INTERVAL '124-30' MONTH TO DAY")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: MONTH to DAY"); + .hasMessage("line 1:12: Invalid interval qualifier: MONTH TO DAY"); assertThatThrownBy(assertions.expression("INTERVAL '124-30' MONTH TO HOUR")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: MONTH to HOUR"); + .hasMessage("line 1:12: Invalid interval qualifier: MONTH TO HOUR"); assertThatThrownBy(assertions.expression("INTERVAL '124-30' MONTH TO MINUTE")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: MONTH to MINUTE"); + .hasMessage("line 1:12: Invalid interval qualifier: MONTH TO MINUTE"); assertThatThrownBy(assertions.expression("INTERVAL '124-30' MONTH TO SECOND")::evaluate) - .hasMessage("line 1:12: Invalid interval qualifier: MONTH to SECOND"); + .hasMessage("line 1:12: Invalid interval qualifier: MONTH TO SECOND"); } private static SqlIntervalYearMonth interval(int year, int month)