Skip to content

Commit 569d741

Browse files
committed
fix
1 parent 8acb912 commit 569d741

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

spark/src/test/scala/org/apache/comet/CometCastSuite.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -690,8 +690,9 @@ class CometCastSuite extends CometTestBase with AdaptiveSparkPlanHelper {
690690
// not attempt native execution if such a value ever reaches the planner.
691691
// Note: DecimalType(7, -2) must be constructed while config=true, because the
692692
// constructor itself checks the config and throws if negative scale is disallowed.
693-
val negScaleType = withSQLConf("spark.sql.legacy.allowNegativeScaleOfDecimal" -> "true") {
694-
DecimalType(7, -2)
693+
var negScaleType: DecimalType = null
694+
withSQLConf("spark.sql.legacy.allowNegativeScaleOfDecimal" -> "true") {
695+
negScaleType = DecimalType(7, -2)
695696
}
696697
withSQLConf("spark.sql.legacy.allowNegativeScaleOfDecimal" -> "false") {
697698
assert(

0 commit comments

Comments
 (0)