Skip to content

Commit

Permalink
[CALCITE-6377] Time expression causes IllegalStateException
Browse files Browse the repository at this point in the history
Signed-off-by: Mihai Budiu <[email protected]>
  • Loading branch information
mihaibudiu committed Apr 19, 2024
1 parent 0551b89 commit e14e47b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3655,6 +3655,7 @@ private static class DatetimeArithmeticImplementor
}
break;
case TIME:
trop1 = normalize(typeName, trop1);
trop1 = Expressions.convert_(trop1, int.class);
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3405,6 +3405,8 @@ private static void checkNullOperand(SqlOperatorFixture f, String op) {
// make sure that TIME values say in range
f.checkScalar("time '12:03:01' + interval '1' day",
"12:03:01", "TIME(0) NOT NULL");
f.checkScalar("time '12:03:01' + interval '25' day",
"12:03:01", "TIME(0) NOT NULL");
f.checkScalar("time '12:03:01' + interval '25' hour",
"13:03:01", "TIME(0) NOT NULL");
f.checkScalar("time '12:03:01' + interval '25:0:1' hour to second",
Expand Down

0 comments on commit e14e47b

Please sign in to comment.