emkornfield commented on code in PR #14142: URL: https://github.com/apache/arrow/pull/14142#discussion_r997718757
########## cpp/src/parquet/column_reader.cc: ########## @@ -1347,16 +1346,24 @@ class TypedRecordReader : public TypedColumnReaderImpl<DType>, int64_t gap = levels_position_ - start_levels_position; if (gap == 0) return; - std::copy(def_levels() + levels_position_, def_levels() + levels_written_, - def_levels() + levels_position_ - gap); + int64_t levels_remaining = levels_written_ - gap; + + int16_t* def_data = def_levels(); + std::copy(def_data + levels_position_, def_data + levels_written_, + def_data + levels_position_ - gap); + PARQUET_THROW_NOT_OK(def_levels_->Resize(levels_remaining * sizeof(int16_t), false)); Review Comment: nit: comment literal. This doesn't try to release the memory correct? -- 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