Skip to content

Commit

Permalink
Fix TryCastSuite
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxGekk committed Feb 15, 2024
1 parent be87add commit 427a334
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package org.apache.spark.sql.catalyst.expressions

import scala.reflect.ClassTag

import org.apache.spark.SparkFunSuite
import org.apache.spark.{SparkFunSuite, SparkThrowable}
import org.apache.spark.sql.catalyst.InternalRow
import org.apache.spark.sql.catalyst.util.DateTimeTestUtils.UTC_OPT
import org.apache.spark.sql.types._
Expand All @@ -44,6 +44,14 @@ class TryCastSuite extends CastWithAnsiOnSuite {
checkEvaluation(expression, null, inputRow)
}

override def checkErrorInExpression[T <: SparkThrowable : ClassTag](
expression: => Expression,
inputRow: InternalRow,
errorClass: String,
parameters: Map[String, String]): Unit = {
checkEvaluation(expression, null, inputRow)
}

override def checkCastToBooleanError(l: Literal, to: DataType, tryCastResult: Any): Unit = {
checkEvaluation(cast(l, to), tryCastResult, InternalRow(l.value))
}
Expand Down

0 comments on commit 427a334

Please sign in to comment.