[FEAT MERGE] impl vectorization 2.0
Co-authored-by: Naynahs <cfzy002@126.com> Co-authored-by: hwx65 <1780011298@qq.com> Co-authored-by: oceanoverflow <oceanoverflow@gmail.com>
This commit is contained in:
@ -19,12 +19,21 @@
|
||||
|
||||
namespace oceanbase
|
||||
{
|
||||
namespace share
|
||||
{
|
||||
namespace schema
|
||||
{
|
||||
class ObColumnParam;
|
||||
}
|
||||
}
|
||||
namespace blocksstable
|
||||
{
|
||||
struct ObStorageDatum;
|
||||
}
|
||||
namespace storage
|
||||
{
|
||||
class ObTableIterParam;
|
||||
class ObTableAccessContext;
|
||||
|
||||
int pad_column(const ObObjMeta &obj_meta,
|
||||
const ObAccuracy accuracy,
|
||||
@ -45,8 +54,63 @@ int pad_on_datums(const common::ObAccuracy accuracy,
|
||||
int64_t row_count,
|
||||
common::ObDatum *&datums);
|
||||
|
||||
int pad_on_rich_format_columns(const common::ObAccuracy accuracy,
|
||||
const common::ObCollationType cs_type,
|
||||
const int64_t row_cap,
|
||||
const int64_t vec_offset,
|
||||
common::ObIAllocator &padding_alloc,
|
||||
sql::ObExpr &expr,
|
||||
sql::ObEvalCtx &eval_ctx);
|
||||
|
||||
int fill_datums_lob_locator(const ObTableIterParam &iter_param,
|
||||
const ObTableAccessContext &context,
|
||||
const share::schema::ObColumnParam &col_param,
|
||||
const int64_t row_cap,
|
||||
ObDatum *datums,
|
||||
bool reuse_lob_locator = true);
|
||||
|
||||
int fill_exprs_lob_locator(const ObTableIterParam &iter_param,
|
||||
const ObTableAccessContext &context,
|
||||
const share::schema::ObColumnParam &col_param,
|
||||
sql::ObExpr &expr,
|
||||
sql::ObEvalCtx &eval_ctx,
|
||||
const int64_t vec_offset,
|
||||
const int64_t row_cap);
|
||||
|
||||
|
||||
int cast_obj(const common::ObObjMeta &src_meta, common::ObIAllocator &cast_allocator, common::ObObj &obj);
|
||||
|
||||
int init_expr_vector_header(
|
||||
sql::ObExpr &expr,
|
||||
sql::ObEvalCtx &eval_ctx,
|
||||
const int64_t size,
|
||||
const VectorFormat format = VectorFormat::VEC_UNIFORM);
|
||||
|
||||
OB_INLINE int init_exprs_uniform_header(
|
||||
const sql::ObExprPtrIArray *exprs,
|
||||
sql::ObEvalCtx &eval_ctx,
|
||||
const int64_t size)
|
||||
{
|
||||
int ret = OB_SUCCESS;
|
||||
if (nullptr != exprs) {
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < exprs->count(); ++i) {
|
||||
sql::ObExpr *expr = exprs->at(i);
|
||||
if (OB_ISNULL(expr)) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
STORAGE_LOG(WARN, "Unexpected null expr", K(ret), KPC(exprs));
|
||||
} else if (OB_FAIL(init_expr_vector_header(*expr, eval_ctx, size))) {
|
||||
STORAGE_LOG(WARN, "Failed to init vector", K(ret), K(i), KPC(expr));
|
||||
}
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int init_exprs_new_format_header(
|
||||
const common::ObIArray<int32_t> &cols_projector,
|
||||
const sql::ObExprPtrIArray &exprs,
|
||||
sql::ObEvalCtx &eval_ctx);
|
||||
|
||||
OB_INLINE bool can_do_ascii_optimize(common::ObCollationType cs_type)
|
||||
{
|
||||
return common::CS_TYPE_UTF8MB4_GENERAL_CI == cs_type
|
||||
|
||||
Reference in New Issue
Block a user