zeroshade commented on code in PR #13310: URL: https://github.com/apache/arrow/pull/13310#discussion_r893644440
########## 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: I'm guessing this was needed cuz of passing nil? Hmm. It would be better to pass an empty slice so we can keep the `[:info.numSpaced()]` since i'm pretty sure `writeValuesSpaced` checks `len` of the first param. -- 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-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org