From f255e6c1293488740b8b5100e4bb0a10d572f554 Mon Sep 17 00:00:00 2001 From: Arttu Voutilainen Date: Fri, 19 Jul 2024 19:14:17 +0200 Subject: [PATCH] fix: remove Instant -> PrecisionTimestamp(TZ) creators --- .../substrait/expression/ExpressionCreator.java | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/core/src/main/java/io/substrait/expression/ExpressionCreator.java b/core/src/main/java/io/substrait/expression/ExpressionCreator.java index 8c764afd3..671d9d465 100644 --- a/core/src/main/java/io/substrait/expression/ExpressionCreator.java +++ b/core/src/main/java/io/substrait/expression/ExpressionCreator.java @@ -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() @@ -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()