File tree 1 file changed +3
-3
lines changed
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/encoders
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -162,14 +162,14 @@ class RowEncoderSuite extends CodegenInterpretedPlanTest {
162
162
assert(row.toSeq(schema).head == decimal)
163
163
}
164
164
165
- test(" RowEncoder should respect nullOnOverflow for decimals" ) {
165
+ test(" SPARK-23179: RowEncoder should respect nullOnOverflow for decimals" ) {
166
166
val schema = new StructType ().add(" decimal" , DecimalType .SYSTEM_DEFAULT )
167
167
testDecimalOverflow(schema, Row (BigDecimal (" 9" * 100 )))
168
168
testDecimalOverflow(schema, Row (new java.math.BigDecimal (" 9" * 100 )))
169
169
}
170
170
171
171
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" ) {
173
173
val encoder = RowEncoder (schema).resolveAndBind()
174
174
intercept[Exception ] {
175
175
encoder.toRow(row)
@@ -182,7 +182,7 @@ class RowEncoderSuite extends CodegenInterpretedPlanTest {
182
182
}
183
183
}
184
184
185
- withSQLConf(SQLConf .DECIMAL_OPERATIONS_NULL_ON_OVERFLOW .key -> true .toString ) {
185
+ withSQLConf(SQLConf .DECIMAL_OPERATIONS_NULL_ON_OVERFLOW .key -> " true" ) {
186
186
val encoder = RowEncoder (schema).resolveAndBind()
187
187
assert(encoder.fromRow(encoder.toRow(row)).get(0 ) == null )
188
188
}
You can’t perform that action at this time.
0 commit comments