Describe the bug, including details regarding any error messages, version, and platform.
This limits the usefulness of RecordFromJSON for testing, and implies we may have been writing incorrect tests.
You silently get wrong data:
package main
import (
"bytes"
"fmt"
"log"
"github.com/apache/arrow-go/v18/arrow"
"github.com/apache/arrow-go/v18/arrow/array"
"github.com/apache/arrow-go/v18/arrow/memory"
)
func main() {
mem := memory.DefaultAllocator
dt := arrow.FixedWidthTypes.Duration_s
record, _, err := array.FromJSON(mem, dt, bytes.NewReader([]byte("[9223372036854775807]")))
if err != nil {
log.Fatal(err)
}
fmt.Println(record)
}
Result:
Commonly, large integers are represented as strings in JSON to get around this. That doesn't work:
package main
import (
"bytes"
"fmt"
"log"
"github.com/apache/arrow-go/v18/arrow"
"github.com/apache/arrow-go/v18/arrow/array"
"github.com/apache/arrow-go/v18/arrow/memory"
)
func main() {
mem := memory.DefaultAllocator
dt := arrow.FixedWidthTypes.Duration_s
record, _, err := array.FromJSON(mem, dt, bytes.NewReader([]byte(`["9223372036854775807"]`)))
if err != nil {
log.Fatal(err)
}
fmt.Println(record)
}
Result:
2026/05/07 15:36:14 json: cannot unmarshal 9223372036854775807 into Go value of type arrow.Duration
exit status 1
Component(s)
Other
Describe the bug, including details regarding any error messages, version, and platform.
This limits the usefulness of RecordFromJSON for testing, and implies we may have been writing incorrect tests.
You silently get wrong data:
Result:
Commonly, large integers are represented as strings in JSON to get around this. That doesn't work:
Result:
Component(s)
Other