@@ -40,6 +40,7 @@ class IonSupportSpec extends AnyWordSpec with Matchers with FutureResultSupport
40
40
else dateFormat.format(d),
41
41
coerceUserInput = {
42
42
case s : String => parseDate(s)
43
+ case d : Date => Right (d)
43
44
case _ => Left (DateCoercionViolation )
44
45
},
45
46
coerceInput = {
@@ -51,13 +52,20 @@ class IonSupportSpec extends AnyWordSpec with Matchers with FutureResultSupport
51
52
val BlobType = ScalarType [Array [Byte ]](
52
53
" Blob" ,
53
54
coerceOutput = (d, _) => d,
54
- coerceUserInput = _ => Left (BinaryCoercionViolation ),
55
- coerceInput = _ => Left (BinaryCoercionViolation ))
55
+ coerceUserInput = {
56
+ case bs : Array [Byte ] => Right (bs)
57
+ case _ => Left (BinaryCoercionViolation )
58
+ },
59
+ coerceInput = _ => Left (BinaryCoercionViolation )
60
+ )
56
61
57
62
val ClobType = ScalarType [Array [Byte ]](
58
63
" Clob" ,
59
64
coerceOutput = (d, _) => d,
60
- coerceUserInput = _ => Left (BinaryCoercionViolation ),
65
+ coerceUserInput = {
66
+ case bs : Array [Byte ] => Right (bs)
67
+ case _ => Left (BinaryCoercionViolation )
68
+ },
61
69
coerceInput = _ => Left (BinaryCoercionViolation ),
62
70
scalarInfo = Set (IonClobScalar )
63
71
)
0 commit comments