[placeholder] serialization placeholder for domain index scan and text retrieval

This commit is contained in:
saltonz
2024-02-09 16:51:19 +00:00
committed by ob-robot
parent 7947bba1be
commit 646a7d70fe
10 changed files with 462 additions and 10 deletions

View File

@ -58,7 +58,8 @@ OB_SERIALIZE_MEMBER(ObDASScanCtDef,
external_files_,
external_file_format_str_,
trans_info_expr_,
group_by_column_ids_);
group_by_column_ids_,
ir_scan_type_);
OB_DEF_SERIALIZE(ObDASScanRtDef)
{
@ -169,7 +170,8 @@ ObDASScanOp::ObDASScanOp(ObIAllocator &op_alloc)
scan_rtdef_(nullptr),
result_(nullptr),
remain_row_cnt_(0),
retry_alloc_(nullptr)
retry_alloc_(nullptr),
ir_param_(op_alloc)
{
}
@ -739,7 +741,72 @@ OB_SERIALIZE_MEMBER((ObDASScanOp, ObIDASTaskOp),
scan_param_.key_ranges_,
scan_ctdef_,
scan_rtdef_,
scan_param_.ss_key_ranges_);
scan_param_.ss_key_ranges_,
ir_param_);
OB_DEF_SERIALIZE(ObDASIRParam)
{
int ret = OB_SUCCESS;
const bool ir_scan = is_ir_scan();
LST_DO_CODE(OB_UNIS_ENCODE, ir_scan);
if (OB_SUCC(ret) && ir_scan) {
if (OB_ISNULL(ctdef_) || OB_ISNULL(rtdef_)) {
ret = OB_ERR_UNEXPECTED;
LOG_WARN("unexpected nullptr", K(ret));
} else {
LST_DO_CODE(OB_UNIS_ENCODE,
*ctdef_,
*rtdef_,
ls_id_,
inv_idx_tablet_id_,
doc_id_idx_tablet_id_);
}
}
return ret;
}
OB_DEF_DESERIALIZE(ObDASIRParam)
{
int ret = OB_SUCCESS;
bool ir_scan = false;
LST_DO_CODE(OB_UNIS_DECODE, ir_scan);
if (OB_SUCC(ret) && ir_scan) {
if (OB_ISNULL(ctdef_ = OB_NEWx(ObDASIRCtDef, &allocator_, allocator_))) {
ret = OB_ALLOCATE_MEMORY_FAILED;
LOG_WARN("failed to allocate memory for ir ctdef", K(ret));
} else if (OB_ISNULL(rtdef_ = OB_NEWx(ObDASIRRtDef, &allocator_, allocator_))) {
ret = OB_ALLOCATE_MEMORY_FAILED;
LOG_WARN("failed to allocate memory for ir rtdef", K(ret));
} else {
LST_DO_CODE(OB_UNIS_DECODE,
*ctdef_,
*rtdef_,
ls_id_,
inv_idx_tablet_id_,
doc_id_idx_tablet_id_);
}
}
return ret;
}
OB_DEF_SERIALIZE_SIZE(ObDASIRParam)
{
int64_t len = 0;
const bool ir_scan = is_ir_scan();
LST_DO_CODE(OB_UNIS_ADD_LEN, ir_scan);
if (ir_scan) {
if (nullptr != ctdef_ && nullptr != rtdef_) {
LST_DO_CODE(OB_UNIS_ADD_LEN,
*ctdef_,
*rtdef_);
}
LST_DO_CODE(OB_UNIS_ADD_LEN,
ls_id_,
inv_idx_tablet_id_,
doc_id_idx_tablet_id_);
}
return len;
}
ObDASScanResult::ObDASScanResult()
: ObIDASTaskResult(),