Skip to content

Commit 6177592

Browse files
committed
interop: normalize cbor missing
1 parent 6ff410d commit 6177592

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

test/interop/test_interop.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,13 @@ const EXPECTED = Dict(
2929

3030
function _normalize(v)
3131
# SurrealDB returns ints as Int64 and floats as Float64; numeric equality
32-
# already handles cross-type. Strings, bools, nothing pass through. Vectors
33-
# need recursive normalization for the array_mixed case.
32+
# already handles cross-type. Strings, bools pass through. Vectors recurse
33+
# for the array_mixed case. CBOR-decoded `null` inside an array surfaces
34+
# as `Missing`; collapse to `nothing` so == doesn't return `missing`.
3435
if v isa AbstractVector
3536
return Any[_normalize(x) for x in v]
3637
end
38+
v isa Missing && return nothing
3739
return v
3840
end
3941

0 commit comments

Comments
 (0)