Skip to content

Commit 3b38c82

Browse files
committed
Remove config check in constructor
1 parent 5857c5d commit 3b38c82

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

sql/api/src/main/scala/org/apache/spark/sql/errors/CompilationErrors.scala

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,6 @@ private[sql] trait CompilationErrors extends DataTypeErrorsBase {
143143
errorClass = "CANNOT_MODIFY_CONFIG",
144144
messageParameters = Map("key" -> toSQLConf(key), "docroot" -> docroot))
145145
}
146-
147-
def unsupportedTimeTypeError(): Throwable = {
148-
new AnalysisException(
149-
errorClass = "UNSUPPORTED_TIME_TYPE",
150-
messageParameters = Map.empty)
151-
}
152146
}
153147

154148
private[sql] object CompilationErrors extends CompilationErrors

sql/api/src/main/scala/org/apache/spark/sql/types/TimeType.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ import org.apache.spark.sql.internal.SqlApiConfHelper
3434
@Unstable
3535
case class TimeType(precision: Int) extends AnyTimeType {
3636

37-
if (!SqlApiConfHelper.confGetter.get()().isTimeTypeEnabled) {
38-
throw CompilationErrors.unsupportedTimeTypeError()
39-
}
40-
4137
if (precision < TimeType.MIN_PRECISION || precision > TimeType.MAX_PRECISION) {
4238
throw DataTypeErrors.unsupportedTimePrecisionError(precision)
4339
}

0 commit comments

Comments
 (0)