Skip to content

Commit

Permalink
fix: remove Instant -> PrecisionTimestamp(TZ) creators
Browse files Browse the repository at this point in the history
  • Loading branch information
Blizzara committed Jul 19, 2024
1 parent 2ac66cd commit f255e6c
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions core/src/main/java/io/substrait/expression/ExpressionCreator.java
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,6 @@ public static Expression.PrecisionTimestampLiteral precisionTimestamp(
.build();
}

public static Expression.PrecisionTimestampLiteral precisionTimestamp(
boolean nullable, LocalDateTime value) {
var epochMicro =
TimeUnit.SECONDS.toMicros(value.toEpochSecond(ZoneOffset.UTC))
+ TimeUnit.NANOSECONDS.toMicros(value.toLocalTime().getNano());
return precisionTimestamp(nullable, epochMicro, 6);
}

public static Expression.PrecisionTimestampTZLiteral precisionTimestampTZ(
boolean nullable, long value, int precision) {
return Expression.PrecisionTimestampTZLiteral.builder()
Expand All @@ -159,14 +151,6 @@ public static Expression.PrecisionTimestampTZLiteral precisionTimestampTZ(
.build();
}

public static Expression.PrecisionTimestampTZLiteral precisionTimestampTZ(
boolean nullable, Instant value) {
var epochMicro =
TimeUnit.SECONDS.toMicros(value.getEpochSecond())
+ TimeUnit.NANOSECONDS.toMicros(value.getNano());
return precisionTimestampTZ(nullable, epochMicro, 6);
}

public static Expression.IntervalYearLiteral intervalYear(
boolean nullable, int years, int months) {
return Expression.IntervalYearLiteral.builder()
Expand Down

0 comments on commit f255e6c

Please sign in to comment.