Skip to content

Commit 26d4ef9

Browse files
nokiaMSrock-git
authored andcommitted
[feat][serial] Compatible with old version.
1 parent 573c054 commit 26d4ef9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/coprocessor/coprocessor_v2.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ butil::Status CoprocessorV2::Open(const std::any& coprocessor) {
200200

201201
result_record_encoder_ = std::make_shared<RecordEncoder>(coprocessor_.schema_version(), result_serial_schemas_,
202202
coprocessor_.result_schema().common_id());
203+
result_record_encoder_->SetCodecVersion(coprocessor_.codec_version());
203204

204205
#if defined(TEST_COPROCESSOR_V2_MOCK)
205206
rel_runner_ = std::make_shared<rel::mock::RelRunner>();
@@ -609,7 +610,7 @@ butil::Status CoprocessorV2::GetKvFromExprEndOfFinish(std::vector<pb::common::Ke
609610
});
610611
}
611612
// int codec_version = GetCodecVersion(kv.key());
612-
status = RelExprHelper::TransFromOperandWrapper(0x02, result_operand_ptr, result_serial_schemas_,
613+
status = RelExprHelper::TransFromOperandWrapper(coprocessor_.codec_version(), result_operand_ptr, result_serial_schemas_,
613614
result_column_indexes_, result_record);
614615
if (!status.ok()) {
615616
DINGO_LOG(ERROR) << status.error_cstr();

0 commit comments

Comments
 (0)