You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "serramatutu (via GitHub)" <gi...@apache.org> on 2026/09/02 09:17:50 UTC

Re: [PR] fix(arrow/array): Parity with Arrow C++ when reading/writing `null` to/from JSON [arrow-go]

serramatutu commented on code in PR #833:
URL: https://github.com/apache/arrow-go/pull/833#discussion_r3912578203


##########
arrow/array/union_test.go:
##########
@@ -204,8 +204,8 @@ func TestUnionBuilderUnmarshalOnePreservesDecoderConfiguration(t *testing.T) {
 				name string
 				json string
 			}{
-				{name: "integer first", json: `{"i":1.5,"u":[0,1]}`},
-				{name: "union first", json: `{"u":[0,1],"i":1.5}`},
+				{name: "integer first", json: `{"i":2,"u":[0,1]}`},

Review Comment:
   Worth noting: there was a recent change that introduced this test, which was silently decoding `1.5` into an `Int32` array and casting it to `1`. I assume this is a correctness behavior, and since this PR is about validating schemas, the JSON decoder now raises an error for that case. I changed the expected value to `2` so it's the appropriate type.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org