Skip to content

Commit 676fe11

Browse files
committed
ice: Fix "date" type handling
1 parent c6de9a9 commit 676fe11

File tree

1 file changed

+4
-0
lines changed
  • ice/src/main/java/com/altinity/ice/cli/internal/cmd

1 file changed

+4
-0
lines changed

ice/src/main/java/com/altinity/ice/cli/internal/cmd/Insert.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import com.altinity.ice.internal.strings.Strings;
2222
import java.io.IOException;
2323
import java.time.Instant;
24+
import java.time.LocalDate;
2425
import java.time.LocalDateTime;
2526
import java.time.OffsetDateTime;
2627
import java.time.ZoneOffset;
@@ -602,6 +603,9 @@ public static long toPartitionMicros(Object tsValue) {
602603
LocalDateTime ldt = LocalDateTime.parse(s);
603604
return ldt.toInstant(ZoneOffset.UTC).toEpochMilli() * 1000L;
604605
}
606+
case LocalDate localDate -> {
607+
return localDate.atStartOfDay().toInstant(ZoneOffset.UTC).toEpochMilli() * 1000L;
608+
}
605609
case LocalDateTime localDateTime -> {
606610
return localDateTime.toInstant(ZoneOffset.UTC).toEpochMilli() * 1000L;
607611
}

0 commit comments

Comments
 (0)