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 a4852336d2eef..adc37954d8b16 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 @@ -23,8 +23,7 @@ import org.apache.spark.annotation.Experimental import org.apache.spark.sql.catalyst.util.CollationFactory @Experimental -case class CharType(length: Int) - extends StringType(CollationFactory.UTF8_BINARY_COLLATION_ID) { +case class CharType(length: Int) extends StringType(CollationFactory.UTF8_BINARY_COLLATION_ID) { require(length >= 0, "The length of char type cannot be negative.") override def equals(o: Any): Boolean = o match {