ygerzhedovich commented on code in PR #1939:
URL: https://github.com/apache/ignite-3/pull/1939#discussion_r1170125378
##########
modules/runner/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItDynamicParameterTest.java:
##########
@@ -230,18 +244,59 @@ private Object generateValueByType(int i, ColumnType
type) {
(LocalTime) generateValueByType(i, ColumnType.TIME)
);
case TIMESTAMP:
- return Instant.from((LocalDateTime) generateValueByType(i,
ColumnType.DATETIME));
+ return Instant.from(ZonedDateTime.of((LocalDateTime)
generateValueByType(i, ColumnType.DATETIME), ZoneId.systemDefault()));
case DATE:
- return LocalDate.of(2022, 01, 01).plusDays(i);
+ return LocalDate.of(2022, 01, 01).plusDays(i % 30);
case TIME:
- return LocalTime.of(0, 00, 00).plusSeconds(i);
+ return LocalTime.of(0, 00, 00).plusSeconds(i % 1000);
case PERIOD:
return Period.of(i % 2, i % 12, i % 29);
default:
throw new IllegalArgumentException("unsupported type " + type);
}
}
+ private static String toSqlType(ColumnType columnType) {
Review Comment:
SqlTypeUtils.toSqlType() ?
--
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]