hcrosse commented on code in PR #1543:
URL: https://github.com/apache/arrow-go/pull/1543#discussion_r4554389669
##########
parquet/file/column_writer.go:
##########
@@ -524,7 +529,12 @@ func (w *columnWriter) writeLevels(numValues int64,
defLevels, repLevels []int16
}
func (w *columnWriter) writeLevelsSpaced(numLevels int64, defLevels, repLevels
[]int16) {
- if w.descr.MaxDefinitionLevel() > 0 {
+ if maxDefLevel := w.descr.MaxDefinitionLevel(); maxDefLevel > 0 {
+ for _, v := range defLevels[:numLevels] {
Review Comment:
Thanks. I removed the pass instead of gating it. `writeLevelsSpaced` now
takes the count of levels at the maximum that `maybeCalculateValidityBits`
already computes for the batch, so neither V1 nor V2 writes scan the levels
again.
--
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]