Skip to content

Commit 09aa654

Browse files
committed
datalake: remove redundant copy of stats bounds
iobuf_to_bytes() takes its argument by const ref and copies into a fresh bytes, so copying the bound first was an extra allocation and memcpy per column on every file finish.
1 parent 368ebad commit 09aa654

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/v/datalake/serde_parquet_writer.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,10 @@ ss::future<writer_error> serde_parquet_writer::finish() {
127127
ps.null_value_count = *cs.bounds.null_count;
128128
}
129129
if (cs.bounds.min) {
130-
ps.lower_bound = iobuf_to_bytes(cs.bounds.min->value.copy());
130+
ps.lower_bound = iobuf_to_bytes(cs.bounds.min->value);
131131
}
132132
if (cs.bounds.max) {
133-
ps.upper_bound = iobuf_to_bytes(cs.bounds.max->value.copy());
133+
ps.upper_bound = iobuf_to_bytes(cs.bounds.max->value);
134134
}
135135
_column_stats.push_back(std::move(ps));
136136
}

0 commit comments

Comments
 (0)