Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eliminate duplicate allocation of nested string columns #15061

Merged
Merged
3 changes: 2 additions & 1 deletion cpp/src/io/parquet/reader_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ void reader::impl::decode_page_data(size_t skip_rows, size_t num_rows)
valids[idx] = out_buf.null_mask();
data[idx] = out_buf.data();
// only do string buffer for leaf
if (out_buf.string_size() == 0 && col_sizes[pass.chunks[c].src_col_index] > 0) {
if (idx == max_depth - 1 and out_buf.string_size() == 0 and
col_sizes[pass.chunks[c].src_col_index] > 0) {
vuule marked this conversation as resolved.
Show resolved Hide resolved
out_buf.create_string_data(col_sizes[pass.chunks[c].src_col_index], _stream);
}
if (has_strings) { str_data[idx] = out_buf.string_data(); }
Expand Down
Loading