【详述】执行SQL查询报错,然后BE节点服务全部挂掉
【背景】执行SQL
【业务影响】
【StarRocks版本】2.0
【集群规模】1FE+7BE
执行的sql如下:
select *
from
(
select * from test.ranger_day vmrd where vl = ‘38068’
) a
CROSS JOIN LATERAL UNNEST(split(group_concat(’,’,concat(date_day ,’:’, end_mil)),’,’)) AS t ;
日志:
I0107 14:23:49.750211 62663 internal_service.cpp:241] exec plan fragment, fragment_instance_id=6085b670-6f82-11ec-ac38-b4055d5a1034, coord=TNetworkAddress(hostname=10.186.
66.40, port=9020), backend=2 is_pipeline 0
I0107 14:23:49.750275 62663 plan_fragment_executor.cpp:70] Prepare(): query_id=6085b670-6f82-11ec-ac38-b4055d5a1032 fragment_instance_id=6085b670-6f82-11ec-ac38-b4055d5a10
34 backend_num=2
I0107 14:23:49.750293 62663 plan_fragment_executor.cpp:119] Using query memory limit: 80.00 GB
W0107 14:23:49.750418 62663 expr.cpp:332] Vectorized engine node type return nullptr: 0
I0107 14:23:49.751041 62687 internal_service.cpp:284] cancel framgent, fragment_instance_id=6085b670-6f82-11ec-ac38-b4055d5a1034, reason: InternalError
E0107 14:23:49.750452 62663 expr.cpp:189] Could not construct expr tree.
Vectorized engine does not support the operator
TExpr {
01: nodes (list) = list[10] {
[0] = TExprNode {
01: node_type (i32) = 20,
02: type (struct) = TTypeDesc {
01: types (list) = list[2] {
[0] = TTypeNode {
01: type (i32) = 1,
},
[1] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
04: num_children (i32) = 2,
20: output_scale (i32) = -1,
26: fn (struct) = TFunction {
01: name (struct) = TFunctionName {
02: function_name (string) = “split”,
},
02: binary_type (i32) = 0,
03: arg_types (list) = list[2] {
[0] = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
[1] = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
},
04: ret_type (struct) = TTypeDesc {
01: types (list) = list[2] {
[0] = TTypeNode {
01: type (i32) = 1,
},
[1] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
05: has_var_args (bool) = false,
07: signature (string) = “split(VARCHAR, VARCHAR)”,
09: scalar_fn (struct) = TScalarFunction {
01: symbol (string) = “”,
},
11: id (i64) = 0,
30: fid (i64) = 30311,
32: could_apply_dict_optimize (bool) = false,
},
50: use_vectorized (bool) = true,
51: has_nullable_child (bool) = true,
52: is_nullable (bool) = true,
54: is_monotonic (bool) = false,
},
[1] = TExprNode {
01: node_type (i32) = 0,
02: type (struct) = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
04: num_children (i32) = 2,
05: agg_expr (struct) = TAggregateExpr {
01: is_merge_agg (bool) = false,
},
20: output_scale (i32) = -1,
26: fn (struct) = TFunction {
01: name (struct) = TFunctionName {
02: function_name (string) = “group_concat”,
},
02: binary_type (i32) = 0,
03: arg_types (list) = list[2] {
[0] = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
[1] = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
},
04: ret_type (struct) = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
05: has_var_args (bool) = false,
07: signature (string) = “group_concat(VARCHAR, VARCHAR)”,
10: aggregate_fn (struct) = TAggregateFunction {
01: intermediate_type (struct) = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
10: is_analytic_only_fn (bool) = false,
},
11: id (i64) = 0,
30: fid (i64) = 0,
32: could_apply_dict_optimize (bool) = false,
},
50: use_vectorized (bool) = true,
51: has_nullable_child (bool) = true,
52: is_nullable (bool) = true,
54: is_monotonic (bool) = false,
},
[2] = TExprNode {
01: node_type (i32) = 17,
02: type (struct) = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
04: num_children (i32) = 0,
16: string_literal (struct) = TStringLiteral {
01: value (string) = “,”,
},
20: output_scale (i32) = -1,
50: use_vectorized (bool) = true,
51: has_nullable_child (bool) = false,
52: is_nullable (bool) = false,
54: is_monotonic (bool) = true,
},
[3] = TExprNode {
01: node_type (i32) = 20,
02: type (struct) = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
04: num_children (i32) = 3,
20: output_scale (i32) = -1,
26: fn (struct) = TFunction {
01: name (struct) = TFunctionName {
02: function_name (string) = “concat”,
},
02: binary_type (i32) = 0,
03: arg_types (list) = list[1] {
[0] = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
},
04: ret_type (struct) = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
05: has_var_args (bool) = true,
07: signature (string) = “concat(VARCHAR…)”,
09: scalar_fn (struct) = TScalarFunction {
01: symbol (string) = “”,
},
11: id (i64) = 0,
30: fid (i64) = 30250,
32: could_apply_dict_optimize (bool) = true,
},
27: vararg_start_idx (i32) = 0,
50: use_vectorized (bool) = true,
51: has_nullable_child (bool) = true,
52: is_nullable (bool) = true,
54: is_monotonic (bool) = false,
},
[4] = TExprNode {
01: node_type (i32) = 5,
02: type (struct) = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
03: opcode (i32) = 4,
04: num_children (i32) = 1,
20: output_scale (i32) = -1,
23: output_column (i32) = -1,
26: fn (struct) = TFunction {
01: name (struct) = TFunctionName {
02: function_name (string) = “casttovarchar”,
},
02: binary_type (i32) = 0,
03: arg_types (list) = list[1] {
[0] = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 9,
},
},
},
},
},
04: ret_type (struct) = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
05: has_var_args (bool) = false,
07: signature (string) = “casttovarchar(DATE)”,
09: scalar_fn (struct) = TScalarFunction {
01: symbol (string) = “starrocks::CastFunctions::cast_to_string_val”,
},
11: id (i64) = 0,
30: fid (i64) = 0,
32: could_apply_dict_optimize (bool) = false,
},
28: child_type (i32) = 9,
50: use_vectorized (bool) = true,
51: has_nullable_child (bool) = true,
52: is_nullable (bool) = true,
54: is_monotonic (bool) = false,
},
[5] = TExprNode {
01: node_type (i32) = 16,
02: type (struct) = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 9,
},
},
},
},
04: num_children (i32) = 0,
15: slot_ref (struct) = TSlotRef {
01: slot_id (i32) = 2,
02: tuple_id (i32) = 1,
},
20: output_scale (i32) = -1,
23: output_column (i32) = -1,
50: use_vectorized (bool) = true,
51: has_nullable_child (bool) = false,
52: is_nullable (bool) = true,
54: is_monotonic (bool) = true,
},
[6] = TExprNode {
01: node_type (i32) = 17,
02: type (struct) = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
04: num_children (i32) = 0,
16: string_literal (struct) = TStringLiteral {
01: value (string) = “:”,
},
20: output_scale (i32) = -1,
50: use_vectorized (bool) = true,
51: has_nullable_child (bool) = false,
52: is_nullable (bool) = false,
54: is_monotonic (bool) = true,
},
[7] = TExprNode {
01: node_type (i32) = 5,
02: type (struct) = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
03: opcode (i32) = 4,
04: num_children (i32) = 1,
20: output_scale (i32) = -1,
23: output_column (i32) = -1,
26: fn (struct) = TFunction {
01: name (struct) = TFunctionName {
02: function_name (string) = “casttovarchar”,
},
02: binary_type (i32) = 0,
03: arg_types (list) = list[1] {
[0] = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 5,
},
},
},
},
},
04: ret_type (struct) = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
05: has_var_args (bool) = false,
07: signature (string) = “casttovarchar(INT)”,
09: scalar_fn (struct) = TScalarFunction {
01: symbol (string) = “starrocks::CastFunctions::cast_to_string_val”,
},
11: id (i64) = 0,
30: fid (i64) = 0,
32: could_apply_dict_optimize (bool) = false,
},
28: child_type (i32) = 5,
50: use_vectorized (bool) = true,
51: has_nullable_child (bool) = true,
52: is_nullable (bool) = true,
54: is_monotonic (bool) = false,
},
[8] = TExprNode {
01: node_type (i32) = 16,
02: type (struct) = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 5,
},
},
},
},
04: num_children (i32) = 0,
15: slot_ref (struct) = TSlotRef {
01: slot_id (i32) = 4,
02: tuple_id (i32) = 1,
},
20: output_scale (i32) = -1,
23: output_column (i32) = -1,
50: use_vectorized (bool) = true,
51: has_nullable_child (bool) = false,
52: is_nullable (bool) = true,
54: is_monotonic (bool) = true,
},
[9] = TExprNode {
01: node_type (i32) = 17,
02: type (struct) = TTypeDesc {
01: types (list) = list[1] {
[0] = TTypeNode {
01: type (i32) = 0,
02: scalar_type (struct) = TScalarType {
01: type (i32) = 15,
02: len (i32) = -1,
},
},
},
},
04: num_children (i32) = 0,
16: string_literal (struct) = TStringLiteral {
01: value (string) = “,”,
},
20: output_scale (i32) = -1,
50: use_vectorized (bool) = true,
51: has_nullable_child (bool) = false,
52: is_nullable (bool) = false,
54: is_monotonic (bool) = true,
},
},
}
W0107 14:23:49.751403 62663 fragment_mgr.cpp:423] Fail to prepare Fragment, error: Internal error: Vectorized engine does not support the operator