Fix style check rule that breaks the build
Signed-off-by: Mihai Budiu <mbudiu@feldera.com>
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 19dd05f..e13a742 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 <code>TIME WITH TIME ZONE
* '14:33:44.567 GMT+08'</code>.
@@ -36,7 +36,7 @@
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 0e79038..d10ba74 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 <code>TIMESTAMP
* '1969-07-21 03:15 GMT+00:00'</code>.
@@ -35,7 +35,7 @@
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 ----------------------------------------------------------------