zeroshade commented on code in PR #13310:
URL: https://github.com/apache/arrow/pull/13310#discussion_r894776184


##########
go/parquet/file/column_writer_types.gen.go.tmpl:
##########
@@ -137,13 +137,13 @@ func (w *{{.Name}}ColumnChunkWriter) 
WriteBatchSpaced(values []{{.name}}, defLev
 
     w.writeLevelsSpaced(batch, levelSliceOrNil(defLevels, offset, batch), 
levelSliceOrNil(repLevels, offset, batch))
     if values != nil {
-      vals = values[valueOffset:]
+      vals = values[valueOffset:][:info.numSpaced()]
     }
 
     if w.bitsBuffer != nil {
-      w.writeValuesSpaced(vals[:info.numSpaced()], info.batchNum, 
w.bitsBuffer.Bytes(), 0)
+      w.writeValuesSpaced(vals, info.batchNum, w.bitsBuffer.Bytes(), 0)
     } else {
-      w.writeValuesSpaced(vals[:info.numSpaced()], info.batchNum, validBits, 
validBitsOffset+valueOffset)
+      w.writeValuesSpaced(vals, info.batchNum, validBits, 
validBitsOffset+valueOffset)

Review Comment:
   Gotcha, that would be my mistake actually i forgot that `numSpaced` would be 
the full number, not zero which would be fine. 



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