to issue<52362902>:fix time convert date issue in pl
This commit is contained in:
parent
5a47b904ed
commit
8c12503083
@ -3316,6 +3316,7 @@ int ObPLExecState::init(const ParamStore *params, bool is_anonymous)
|
||||
|
||||
OX (exec_ctx_bak_.backup(*ctx_.exec_ctx_));
|
||||
OX (ctx_.exec_ctx_->set_physical_plan_ctx(&get_physical_plan_ctx()));
|
||||
OX (ctx_.exec_ctx_->get_physical_plan_ctx()->set_cur_time(ObTimeUtility::current_time(), *ctx_.exec_ctx_->get_my_session()));
|
||||
OX (need_reset_physical_plan_ = true);
|
||||
if (OB_SUCC(ret) && func_.get_expr_op_size() > 0) {
|
||||
OZ (ctx_.exec_ctx_->init_expr_op(func_.get_expr_op_size(), ctx_.allocator_));
|
||||
|
@ -54,24 +54,20 @@ int ObPLCompiler::check_dep_schema(ObSchemaGetterGuard &schema_guard,
|
||||
K(ret), K(tenant_id), K(dep_schema_objs.at(i)));
|
||||
} else if (OB_INVALID_VERSION == new_version ||
|
||||
new_version != dep_schema_objs.at(i).version_) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("schema version is invalid", K(ret), K(dep_schema_objs.at(i)));
|
||||
LOG_WARN("schema version is invalid", K(ret), K(dep_schema_objs.at(i)), K(new_version));
|
||||
}
|
||||
} else {
|
||||
const ObSimpleTableSchemaV2 *table_schema = nullptr;
|
||||
if (OB_FAIL(schema_guard.get_simple_table_schema(MTL_ID(),
|
||||
dep_schema_objs.at(i).object_id_,
|
||||
table_schema))) {
|
||||
LOG_WARN("failed to get table schema",
|
||||
K(ret), K(dep_schema_objs.at(i)));
|
||||
LOG_WARN("failed to get table schema", K(ret), K(dep_schema_objs.at(i)));
|
||||
} else if (nullptr == table_schema) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("get an unexpected null table schema", K(ret));
|
||||
LOG_WARN("get an unexpected null table schema", K(dep_schema_objs.at(i).object_id_));
|
||||
} else if (table_schema->is_index_table()) {
|
||||
// do nothing
|
||||
} else if (table_schema->get_schema_version() != dep_schema_objs.at(i).version_) {
|
||||
ret = OB_ERR_UNEXPECTED;
|
||||
LOG_WARN("schema version is invalid", K(ret), K(dep_schema_objs.at(i)));
|
||||
LOG_WARN("schema version is invalid", K(ret), K(dep_schema_objs.at(i)), K(table_schema->get_schema_version()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7355,7 +7355,8 @@ int ObSPIService::convert_obj(ObPLExecCtx *ctx,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ObObj &cur_time = ctx->exec_ctx_->get_physical_plan_ctx()->get_cur_time();
|
||||
cast_ctx.cur_time_ = cur_time.get_timestamp();
|
||||
ObExprResType result_type;
|
||||
OX (result_type.set_meta(result_types[i].get_meta_type()));
|
||||
OX (result_type.set_accuracy(result_types[i].get_accuracy()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user