File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -48,4 +48,15 @@ class CatalystTypeConvertersSuite extends SparkFunSuite {
4848 assert(CatalystTypeConverters .createToScalaConverter(dataType)(null ) === null )
4949 }
5050 }
51+
52+ test(" option handling in convertToCatalyst" ) {
53+ // convertToCatalyst doesn't handle unboxing from Options. This is inconsistent with
54+ // createToCatalystConverter but it may not actually matter as this is only called internally
55+ // in a handful of places where we don't expect to receive Options.
56+ assert(CatalystTypeConverters .convertToCatalyst(Some (123 )) === Some (123 ))
57+ }
58+
59+ test(" option handling in createToCatalystConverter" ) {
60+ assert(CatalystTypeConverters .createToCatalystConverter(IntegerType )(Some (123 )) === 123 )
61+ }
5162}
You can’t perform that action at this time.
0 commit comments