Skip to content

Commit 6c05f0e

Browse files
committed
fix
1 parent 8c24f53 commit 6c05f0e

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/paimon/format/avro/avro_direct_encoder.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,7 @@ Status AvroDirectEncoder::EncodeArrowToAvro(const ::avro::NodePtr& avro_node,
227227
const auto& binary_array =
228228
arrow::internal::checked_cast<const arrow::BinaryArray&>(array);
229229
std::string_view value = binary_array.GetView(row_index);
230-
// TODO(jinli.zjw): need to copy to ctx?
231-
ctx->assign(value.begin(), value.end());
232-
encoder->encodeBytes(ctx->data(), ctx->size());
230+
encoder->encodeBytes(reinterpret_cast<const uint8_t*>(value.data()), value.size());
233231
return Status::OK();
234232
}
235233

0 commit comments

Comments
 (0)