[CP] Json bugfix: json column length and create view with json
This commit is contained in:
@ -466,6 +466,11 @@ int ObRawExpr::postorder_replace(ObRawExprVisitor& visitor)
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool ObRawExpr::is_json_expr() const
|
||||
{
|
||||
return (T_FUN_SYS_JSON_OBJECT <= get_expr_type() && get_expr_type() <= T_FUN_JSON_OBJECTAGG) ? true : false;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
ObRawExpr*& ObTerminalRawExpr::get_param_expr(int64_t index)
|
||||
{
|
||||
|
||||
@ -1508,6 +1508,7 @@ public:
|
||||
{
|
||||
is_deterministic_ = is_deterministic;
|
||||
}
|
||||
bool is_json_expr() const;
|
||||
VIRTUAL_TO_STRING_KV(N_ITEM_TYPE, type_, N_RESULT_TYPE, result_type_, N_EXPR_INFO, info_, N_REL_ID, rel_ids_,
|
||||
K_(expr_level), K_(expr_levels), K_(enum_set_values), K_(is_explicited_reference), K_(ref_count),
|
||||
K_(is_for_generated_column), K_(extra), K_(is_calculated));
|
||||
|
||||
@ -1074,6 +1074,7 @@ int ObRawExprDeduceType::visit(ObAggFunRawExpr& expr)
|
||||
}
|
||||
case T_FUN_JSON_ARRAYAGG: {
|
||||
result_type.set_json();
|
||||
result_type.set_length((ObAccuracy::DDL_DEFAULT_ACCURACY[ObJsonType]).get_length());
|
||||
expr.set_result_type(result_type);
|
||||
break;
|
||||
}
|
||||
@ -1095,6 +1096,7 @@ int ObRawExprDeduceType::visit(ObAggFunRawExpr& expr)
|
||||
need_add_cast = true;
|
||||
}
|
||||
result_type.set_json();
|
||||
result_type.set_length((ObAccuracy::DDL_DEFAULT_ACCURACY[ObJsonType]).get_length());
|
||||
expr.set_result_type(result_type);
|
||||
}
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user