Skip to content

Commit 0808fd2

Browse files
committed
make constrcutor of TypeCheckResult private
1 parent 3bee157 commit 0808fd2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/TypeCheckResult.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ package org.apache.spark.sql.catalyst.analysis
2020
/**
2121
* Represents the result of `Expression.checkInputDataTypes`.
2222
* We will throw `AnalysisException` in `CheckAnalysis` if error message is not null.
23+
* Use [[TypeCheckResult.success]] and [[TypeCheckResult.fail]] to instantiate this.
2324
*
2425
*/
25-
class TypeCheckResult(val errorMessage: String) extends AnyVal {
26+
class TypeCheckResult private (val errorMessage: String) extends AnyVal {
2627
def hasError: Boolean = errorMessage != null
2728
}
2829

0 commit comments

Comments
 (0)