Skip to content

Commit 87073da

Browse files
improve test style and follow naming convention
1 parent 2513ea7 commit 87073da

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/encoders/RowEncoderSuite.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,14 @@ class RowEncoderSuite extends CodegenInterpretedPlanTest {
162162
assert(row.toSeq(schema).head == decimal)
163163
}
164164

165-
test("RowEncoder should respect nullOnOverflow for decimals") {
165+
test("SPARK-23179: RowEncoder should respect nullOnOverflow for decimals") {
166166
val schema = new StructType().add("decimal", DecimalType.SYSTEM_DEFAULT)
167167
testDecimalOverflow(schema, Row(BigDecimal("9" * 100)))
168168
testDecimalOverflow(schema, Row(new java.math.BigDecimal("9" * 100)))
169169
}
170170

171171
private def testDecimalOverflow(schema: StructType, row: Row): Unit = {
172-
withSQLConf(SQLConf.DECIMAL_OPERATIONS_NULL_ON_OVERFLOW.key -> false.toString) {
172+
withSQLConf(SQLConf.DECIMAL_OPERATIONS_NULL_ON_OVERFLOW.key -> "false") {
173173
val encoder = RowEncoder(schema).resolveAndBind()
174174
intercept[Exception] {
175175
encoder.toRow(row)
@@ -182,7 +182,7 @@ class RowEncoderSuite extends CodegenInterpretedPlanTest {
182182
}
183183
}
184184

185-
withSQLConf(SQLConf.DECIMAL_OPERATIONS_NULL_ON_OVERFLOW.key -> true.toString) {
185+
withSQLConf(SQLConf.DECIMAL_OPERATIONS_NULL_ON_OVERFLOW.key -> "true") {
186186
val encoder = RowEncoder(schema).resolveAndBind()
187187
assert(encoder.fromRow(encoder.toRow(row)).get(0) == null)
188188
}

0 commit comments

Comments
 (0)