fix view zerofill bug && fix mem mgr sql id dynamic leak && fix vectorize in core
This commit is contained in:
committed by
ob-robot
parent
33b9cfe0bd
commit
fcadb31c97
@ -844,6 +844,7 @@ inline int ObExprGeneratorImpl::visit_in_expr(ObOpRawExpr &expr, ObExprInOrNotIn
|
|||||||
bool param_all_same_cs_type = true;
|
bool param_all_same_cs_type = true;
|
||||||
bool param_all_is_ext = true;
|
bool param_all_is_ext = true;
|
||||||
bool param_all_same_cs_level = true;
|
bool param_all_same_cs_level = true;
|
||||||
|
bool param_all_can_vectorize = param_all_const;
|
||||||
ObObjType first_obj_type = param1->get_param_expr(0)->get_data_type();
|
ObObjType first_obj_type = param1->get_param_expr(0)->get_data_type();
|
||||||
ObObjType cur_obj_type = ObMaxType;
|
ObObjType cur_obj_type = ObMaxType;
|
||||||
ObCollationType first_obj_cs_type = param1->get_param_expr(0)->get_collation_type();
|
ObCollationType first_obj_cs_type = param1->get_param_expr(0)->get_collation_type();
|
||||||
@ -859,6 +860,7 @@ inline int ObExprGeneratorImpl::visit_in_expr(ObOpRawExpr &expr, ObExprInOrNotIn
|
|||||||
first_obj_type = cur_obj_type;
|
first_obj_type = cur_obj_type;
|
||||||
first_obj_cs_type = cur_obj_cs_type;
|
first_obj_cs_type = cur_obj_cs_type;
|
||||||
}
|
}
|
||||||
|
param_all_can_vectorize &= param1->get_param_expr(i)->is_static_const_expr();
|
||||||
if (ObNullType != first_obj_type && ObNullType != cur_obj_type) {
|
if (ObNullType != first_obj_type && ObNullType != cur_obj_type) {
|
||||||
param_all_const &= param1->get_param_expr(i)->is_static_const_expr();
|
param_all_const &= param1->get_param_expr(i)->is_static_const_expr();
|
||||||
param_all_same_type &= (first_obj_type == cur_obj_type);
|
param_all_same_type &= (first_obj_type == cur_obj_type);
|
||||||
@ -874,7 +876,7 @@ inline int ObExprGeneratorImpl::visit_in_expr(ObOpRawExpr &expr, ObExprInOrNotIn
|
|||||||
: (param_all_same_cs_type &= param_all_same_cs_level));
|
: (param_all_same_cs_type &= param_all_same_cs_level));
|
||||||
in_op->set_param_is_ext_type_oracle(param_all_is_ext);
|
in_op->set_param_is_ext_type_oracle(param_all_is_ext);
|
||||||
//now only support c1 in (1,2,3,4,5...) to vecotrized
|
//now only support c1 in (1,2,3,4,5...) to vecotrized
|
||||||
if (param_all_const && expr.get_param_expr(0)->is_vectorize_result()) {
|
if (param_all_can_vectorize && expr.get_param_expr(0)->is_vectorize_result()) {
|
||||||
in_op->set_param_can_vectorized();
|
in_op->set_param_can_vectorized();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -58,7 +58,7 @@ uint64_t ObSqlWorkAreaProfile::get_exec_id()
|
|||||||
|
|
||||||
const char* ObSqlWorkAreaProfile::get_sql_id()
|
const char* ObSqlWorkAreaProfile::get_sql_id()
|
||||||
{
|
{
|
||||||
return sql_id_.ptr();
|
return sql_id_;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t ObSqlWorkAreaProfile::get_session_id()
|
uint64_t ObSqlWorkAreaProfile::get_session_id()
|
||||||
@ -75,9 +75,12 @@ int ObSqlWorkAreaProfile::set_exec_info(ObExecContext &exec_ctx)
|
|||||||
session_id_ = ObPxSqcUtil::get_session_id(&exec_ctx);
|
session_id_ = ObPxSqcUtil::get_session_id(&exec_ctx);
|
||||||
ObPhysicalPlanCtx *plan_ctx = exec_ctx.get_physical_plan_ctx();
|
ObPhysicalPlanCtx *plan_ctx = exec_ctx.get_physical_plan_ctx();
|
||||||
if (OB_NOT_NULL(plan_ctx) && OB_NOT_NULL(plan_ctx->get_phy_plan())) {
|
if (OB_NOT_NULL(plan_ctx) && OB_NOT_NULL(plan_ctx->get_phy_plan())) {
|
||||||
OZ (ob_write_string(exec_ctx.get_allocator(),
|
if (nullptr == plan_ctx->get_phy_plan()->get_sql_id()) {
|
||||||
plan_ctx->get_phy_plan()->get_sql_id_string(),
|
sql_id_[0] = '\0';
|
||||||
sql_id_));
|
} else {
|
||||||
|
memcpy(sql_id_, plan_ctx->get_phy_plan()->get_sql_id(), OB_MAX_SQL_ID_LENGTH);
|
||||||
|
sql_id_[OB_MAX_SQL_ID_LENGTH] = '\0';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -45,6 +45,7 @@ public:
|
|||||||
pre_mem_used_(0), dumped_size_(0), data_ratio_(0.5), active_time_(0), number_pass_(0),
|
pre_mem_used_(0), dumped_size_(0), data_ratio_(0.5), active_time_(0), number_pass_(0),
|
||||||
calc_count_(0)
|
calc_count_(0)
|
||||||
{
|
{
|
||||||
|
sql_id_[0] = '\0';
|
||||||
ObRandom rand;
|
ObRandom rand;
|
||||||
random_id_ = rand.get();
|
random_id_ = rand.get();
|
||||||
}
|
}
|
||||||
@ -178,7 +179,7 @@ private:
|
|||||||
int64_t dop_;
|
int64_t dop_;
|
||||||
int64_t plan_id_;
|
int64_t plan_id_;
|
||||||
int64_t exec_id_;
|
int64_t exec_id_;
|
||||||
ObString sql_id_;
|
char sql_id_[common::OB_MAX_SQL_ID_LENGTH + 1];
|
||||||
int64_t session_id_;
|
int64_t session_id_;
|
||||||
// 取 min(cache_size, global_bound_size)
|
// 取 min(cache_size, global_bound_size)
|
||||||
// sort场景,在global_bound_size比较大情况下,sort理论上有data和extra内存,data应该是one-pass size
|
// sort场景,在global_bound_size比较大情况下,sort理论上有data和extra内存,data应该是one-pass size
|
||||||
|
|||||||
@ -781,6 +781,7 @@ int ObCreateViewResolver::add_column_infos(const uint64_t tenant_id,
|
|||||||
column.set_charset_type(table_schema.get_charset_type());
|
column.set_charset_type(table_schema.get_charset_type());
|
||||||
column.set_collation_type(expr->get_collation_type());
|
column.set_collation_type(expr->get_collation_type());
|
||||||
column.set_accuracy(expr->get_accuracy());
|
column.set_accuracy(expr->get_accuracy());
|
||||||
|
column.set_zero_fill(expr->get_result_type().has_result_flag(ZEROFILL_FLAG));
|
||||||
OZ (adjust_string_column_length_within_max(column, lib::is_oracle_mode()));
|
OZ (adjust_string_column_length_within_max(column, lib::is_oracle_mode()));
|
||||||
if (lib::is_mysql_mode()) { // oracle mode has default expr value, not support now
|
if (lib::is_mysql_mode()) { // oracle mode has default expr value, not support now
|
||||||
OZ (resolve_column_default_value(&select_stmt, select_item, column, alloc, session_info));
|
OZ (resolve_column_default_value(&select_stmt, select_item, column, alloc, session_info));
|
||||||
|
|||||||
Reference in New Issue
Block a user