fallintoplace commented on code in PR #1108:
URL: https://github.com/apache/arrow-go/pull/1108#discussion_r3744999797


##########
arrow/scalar/scalar.go:
##########
@@ -802,12 +772,20 @@ func MakeArrayFromScalar(sc Scalar, length int, mem 
memory.Allocator) (arrow.Arr
                return MakeArrayOfNull(sc.DataType(), length, mem), nil
        }
 
-       createOffsets := func(valLength int32) *memory.Buffer {
+       createOffsets := func(valLength int64) *memory.Buffer {
                buffer := memory.NewResizableBuffer(mem)
-               buffer.Resize(arrow.Int32Traits.BytesRequired(length + 1))
+               if sc.DataType().ID() == arrow.LARGE_BINARY || 
sc.DataType().ID() == arrow.LARGE_STRING {

Review Comment:
   MakeArrayFromScalar does not support LargeList scalars today. The existing 
nested implementation only handles *List, so *LargeList still returns the 
existing “not yet implemented” error.
   
   I kept this PR scoped to the binary/string scalar paths, where the 
offset-width bug exists. The change covers Binary, String, LargeBinary, and 
LargeString. I think LargeList support would be better handled separately with 
its own implementation and tests.



-- 
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