[CP] to issue<53024365>:fix date type pl var used by sql issue
This commit is contained in:
@ -3161,7 +3161,13 @@ do { \
|
|||||||
sql::ObSqlExpression *default_expr = func_.get_default_expr(i);
|
sql::ObSqlExpression *default_expr = func_.get_default_expr(i);
|
||||||
OV (OB_NOT_NULL(default_expr), OB_ERR_UNEXPECTED, K(i), K(func_.get_default_idxs()));
|
OV (OB_NOT_NULL(default_expr), OB_ERR_UNEXPECTED, K(i), K(func_.get_default_idxs()));
|
||||||
OZ (ObSPIService::spi_calc_expr(&ctx_, default_expr, OB_INVALID_INDEX, &result));
|
OZ (ObSPIService::spi_calc_expr(&ctx_, default_expr, OB_INVALID_INDEX, &result));
|
||||||
|
if (OB_SUCC(ret) && result.is_null()) {
|
||||||
|
ObObjMeta null_meta = get_params().at(i).get_meta();
|
||||||
|
get_params().at(i).set_null();
|
||||||
|
get_params().at(i).set_null_meta(null_meta);
|
||||||
|
} else {
|
||||||
OX (get_params().at(i) = result);
|
OX (get_params().at(i) = result);
|
||||||
|
}
|
||||||
if (pl_type.is_composite_type() && result.is_null()) {
|
if (pl_type.is_composite_type() && result.is_null()) {
|
||||||
OZ (init_complex_obj(
|
OZ (init_complex_obj(
|
||||||
(*get_allocator()), func_.get_variables().at(i), get_params().at(i)));
|
(*get_allocator()), func_.get_variables().at(i), get_params().at(i)));
|
||||||
|
|||||||
@ -930,6 +930,9 @@ int ObSPIService::spi_calc_expr(ObPLExecCtx *ctx,
|
|||||||
} else if (result->get_accuracy() == invalid_accuracy) {
|
} else if (result->get_accuracy() == invalid_accuracy) {
|
||||||
result->set_accuracy(ctx->params_->at(result_idx).get_accuracy());
|
result->set_accuracy(ctx->params_->at(result_idx).get_accuracy());
|
||||||
}
|
}
|
||||||
|
if (result->is_null()) {
|
||||||
|
result->set_null_meta(param.get_null_meta());
|
||||||
|
}
|
||||||
if (has_lob_header) {
|
if (has_lob_header) {
|
||||||
result->ObObj::set_has_lob_header();
|
result->ObObj::set_has_lob_header();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user