From 325b1ba84518d4a9cd449e315ec22d84f6669671 Mon Sep 17 00:00:00 2001 From: Mihai Budiu Date: Tue, 12 Mar 2024 09:21:42 -0700 Subject: [PATCH] Fix style check rule that breaks the build Signed-off-by: Mihai Budiu --- .../main/java/org/apache/calcite/sql/SqlTimeTzLiteral.java | 6 +++--- .../java/org/apache/calcite/sql/SqlTimestampTzLiteral.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/org/apache/calcite/sql/SqlTimeTzLiteral.java b/core/src/main/java/org/apache/calcite/sql/SqlTimeTzLiteral.java index 19dd05ff6ce..e13a742d352 100644 --- a/core/src/main/java/org/apache/calcite/sql/SqlTimeTzLiteral.java +++ b/core/src/main/java/org/apache/calcite/sql/SqlTimeTzLiteral.java @@ -20,10 +20,10 @@ import org.apache.calcite.sql.type.SqlTypeName; import org.apache.calcite.util.TimeWithTimeZoneString; -import com.google.common.base.Preconditions; - import java.util.Objects; +import static com.google.common.base.Preconditions.checkArgument; + /** * A SQL literal representing a TIME WITH TIME ZONE value, for example TIME WITH TIME ZONE * '14:33:44.567 GMT+08'. @@ -36,7 +36,7 @@ public class SqlTimeTzLiteral extends SqlAbstractDateTimeLiteral { SqlTimeTzLiteral(TimeWithTimeZoneString t, int precision, SqlParserPos pos) { super(t, true, SqlTypeName.TIME_TZ, precision, pos); - Preconditions.checkArgument(this.precision >= 0); + checkArgument(this.precision >= 0); } //~ Methods ---------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/calcite/sql/SqlTimestampTzLiteral.java b/core/src/main/java/org/apache/calcite/sql/SqlTimestampTzLiteral.java index 0e7903802bd..d10ba742df8 100644 --- a/core/src/main/java/org/apache/calcite/sql/SqlTimestampTzLiteral.java +++ b/core/src/main/java/org/apache/calcite/sql/SqlTimestampTzLiteral.java @@ -20,10 +20,10 @@ import org.apache.calcite.sql.type.SqlTypeName; import org.apache.calcite.util.TimestampWithTimeZoneString; -import com.google.common.base.Preconditions; - import java.util.Objects; +import static com.google.common.base.Preconditions.checkArgument; + /** * A SQL literal representing a TIMESTAMP WITH TIME ZONE value, for example TIMESTAMP * '1969-07-21 03:15 GMT+00:00'. @@ -35,7 +35,7 @@ public class SqlTimestampTzLiteral extends SqlAbstractDateTimeLiteral { SqlTimestampTzLiteral(TimestampWithTimeZoneString ts, int precision, SqlParserPos pos) { super(ts, false, SqlTypeName.TIMESTAMP_TZ, precision, pos); - Preconditions.checkArgument(this.precision >= 0); + checkArgument(this.precision >= 0); } //~ Methods ----------------------------------------------------------------