[FEAT MERGE] add direct load function

Co-authored-by: Monk-Liu <1152761042@qq.com>
Co-authored-by: saltonz <saltonzh@gmail.com>
Co-authored-by: yongshige <598633031@qq.com>
This commit is contained in:
obdev
2023-01-28 18:08:50 +08:00
committed by ob-robot
parent f27d2efc83
commit 81d28c0295
384 changed files with 55860 additions and 1239 deletions

View File

@ -0,0 +1,43 @@
// Copyright (c) 2022-present Oceanbase Inc. All Rights Reserved.
// Author:
// yuya.yu <yuya.yu@oceanbase.com>
#pragma once
#include "lib/container/ob_iarray.h"
namespace oceanbase
{
namespace observer
{
class ObTableLoadExecCtx;
class ObTableLoadInstance;
}
namespace sql
{
class ObExecContext;
class ObTableDirectInsertCtx
{
public:
ObTableDirectInsertCtx()
: load_exec_ctx_(nullptr),
table_load_instance_(nullptr),
is_inited_(false) {}
~ObTableDirectInsertCtx();
TO_STRING_KV(K_(is_inited));
public:
int init(sql::ObExecContext *exec_ctx, const uint64_t table_id, const int64_t parallel);
int finish();
void destroy();
private:
int init_store_column_idxs(const uint64_t tenant_id, const uint64_t table_id,
common::ObIArray<int64_t> &store_column_idxs);
private:
observer::ObTableLoadExecCtx *load_exec_ctx_;
observer::ObTableLoadInstance *table_load_instance_;
bool is_inited_;
};
} // namespace observer
} // namespace oceanbase