zeroshade opened a new pull request, #1428:
URL: https://github.com/apache/arrow-go/pull/1428

   ### Rationale for this change
   
   The Dependabot bump of `github.com/goccy/go-json` to v0.11.2 (#1357) fails 
CI. go-json 0.11 is stricter and follows `encoding/json`'s behaviour for the Go 
version it is built with, which exposed three tests that depended on lenient 
parsing or on backend-specific error details:
   
   - `arrow/compute` `TestIsInDecimal`: the expected array literal is `[true, 
false true]` (missing comma); go-json 0.10 accepted it.
   - `arrow/array` `TestIntegerArrsJSON` and 
`TestRecordBuilderUnmarshalOneReturnUnexpectedEOF`: under Go 1.27's v2 JSON 
semantics, truncated input is reported as a syntax error ("unexpected end of 
JSON input") instead of `io.ErrUnexpectedEOF`.
   - `parquet/variant` `TestBuilderJSONErrors`: the error message depends on 
which tokenizer call first notices the malformed input.
   
   The last two already fail on `main` with the standard-library backend 
(`-tags arrow_json_stdlib`, also used for TinyGo) under Go 1.27, independent of 
the bump.
   
   ### What changes are included in this PR?
   
   Test-only:
   
   - Fix the JSON literal in `TestIsInDecimal`.
   - A helper `assertTruncatedJSONError` checks that truncated input is an 
error and **not** a clean `io.EOF` — the invariant #1341 added — while 
accepting either `io.ErrUnexpectedEOF` or an "unexpected end of JSON input" 
syntax error.
   - `TestBuilderJSONErrors` keeps all its malformed inputs but only checks 
that `ParseJSON` rejects them.
   
   ### Are these changes tested?
   
   The affected packages (`arrow/array`, `arrow/compute`, `parquet/variant`) 
pass with Go 1.26 and Go 1.27, each with go-json v0.10.6, go-json v0.11.2 and 
`-tags arrow_json_stdlib`. Disabling the `io.EOF` → `io.ErrUnexpectedEOF` 
conversion in `RecordBuilder.unmarshalOne` still fails 
`TestRecordBuilderUnmarshalOneReturnUnexpectedEOF` ("truncated input must not 
be reported as a clean EOF").
   
   ### Are there any user-facing changes?
   
   No.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to