From 99180108f6f43508c313db071d19abcf9be9355e Mon Sep 17 00:00:00 2001 From: Jovan Markovic Date: Tue, 19 Nov 2024 12:37:33 +0100 Subject: [PATCH] Fix formatting --- .../src/main/scala/org/apache/spark/sql/types/CharType.scala | 2 +- .../src/main/scala/org/apache/spark/sql/types/VarcharType.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/api/src/main/scala/org/apache/spark/sql/types/CharType.scala b/sql/api/src/main/scala/org/apache/spark/sql/types/CharType.scala index d9301ed5b837a..9b73afc24c3a0 100644 --- a/sql/api/src/main/scala/org/apache/spark/sql/types/CharType.scala +++ b/sql/api/src/main/scala/org/apache/spark/sql/types/CharType.scala @@ -24,7 +24,7 @@ import org.apache.spark.sql.catalyst.util.CollationFactory @Experimental case class CharType(length: Int) - extends StringType(CollationFactory.UTF8_BINARY_COLLATION_ID, Some(length)) { + extends StringType(CollationFactory.UTF8_BINARY_COLLATION_ID, Some(length)) { require(length >= 0, "The length of char type cannot be negative.") override def equals(o: Any): Boolean = o match { diff --git a/sql/api/src/main/scala/org/apache/spark/sql/types/VarcharType.scala b/sql/api/src/main/scala/org/apache/spark/sql/types/VarcharType.scala index 76e060d1ea70b..4002d003bf363 100644 --- a/sql/api/src/main/scala/org/apache/spark/sql/types/VarcharType.scala +++ b/sql/api/src/main/scala/org/apache/spark/sql/types/VarcharType.scala @@ -23,7 +23,7 @@ import org.apache.spark.sql.catalyst.util.CollationFactory @Experimental case class VarcharType(length: Int) - extends StringType(CollationFactory.UTF8_BINARY_COLLATION_ID, Some(length)) { + extends StringType(CollationFactory.UTF8_BINARY_COLLATION_ID, Some(length)) { require(length >= 0, "The length of varchar type cannot be negative.") override def equals(o: Any): Boolean = o match {