1.5 3 \N \N 1.5 3 2 6 6 10 9 3 6 1 5 6 3 2 2 7 2 5 6 3 2 2 7 2 QUERY id: 0 PROJECTION COLUMNS sum(a) Nullable(Int64) avg(a) Nullable(Float64) PROJECTION LIST id: 1, nodes: 2 FUNCTION id: 2, function_name: sum, function_type: aggregate, result_type: Nullable(Int64) ARGUMENTS LIST id: 3, nodes: 1 COLUMN id: 4, column_name: a, result_type: Nullable(Int8), source_id: 5 FUNCTION id: 6, function_name: avg, function_type: aggregate, result_type: Nullable(Float64) ARGUMENTS LIST id: 7, nodes: 1 COLUMN id: 4, column_name: a, result_type: Nullable(Int8), source_id: 5 JOIN TREE TABLE id: 5, table_name: default.fuse_tbl QUERY id: 0 PROJECTION COLUMNS sum(b) Int64 avg(b) Float64 PROJECTION LIST id: 1, nodes: 2 FUNCTION id: 2, function_name: tupleElement, function_type: ordinary, result_type: Int64 ARGUMENTS LIST id: 3, nodes: 2 FUNCTION id: 4, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 5, nodes: 1 COLUMN id: 6, column_name: b, result_type: Int8, source_id: 7 CONSTANT id: 8, constant_value: UInt64_1, constant_value_type: UInt8 FUNCTION id: 9, function_name: divide, function_type: ordinary, result_type: Float64 ARGUMENTS LIST id: 10, nodes: 2 FUNCTION id: 11, function_name: tupleElement, function_type: ordinary, result_type: Int64 ARGUMENTS LIST id: 12, nodes: 2 FUNCTION id: 4, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 5, nodes: 1 COLUMN id: 6, column_name: b, result_type: Int8, source_id: 7 CONSTANT id: 13, constant_value: UInt64_1, constant_value_type: UInt8 FUNCTION id: 14, function_name: toFloat64, function_type: ordinary, result_type: Float64 ARGUMENTS LIST id: 15, nodes: 1 FUNCTION id: 16, function_name: tupleElement, function_type: ordinary, result_type: UInt64 ARGUMENTS LIST id: 17, nodes: 2 FUNCTION id: 4, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 5, nodes: 1 COLUMN id: 6, column_name: b, result_type: Int8, source_id: 7 CONSTANT id: 18, constant_value: UInt64_2, constant_value_type: UInt8 JOIN TREE TABLE id: 7, table_name: default.fuse_tbl QUERY id: 0 PROJECTION COLUMNS sum(plus(a, 1)) Nullable(Int64) sum(b) Int64 count(b) UInt64 avg(b) Float64 count(plus(a, 1)) UInt64 sum(plus(a, 2)) Nullable(Int64) count(a) UInt64 PROJECTION LIST id: 1, nodes: 7 FUNCTION id: 2, function_name: sum, function_type: aggregate, result_type: Nullable(Int64) ARGUMENTS LIST id: 3, nodes: 1 FUNCTION id: 4, function_name: plus, function_type: ordinary, result_type: Nullable(Int16) ARGUMENTS LIST id: 5, nodes: 2 COLUMN id: 6, column_name: a, result_type: Nullable(Int8), source_id: 7 CONSTANT id: 8, constant_value: UInt64_1, constant_value_type: UInt8 FUNCTION id: 9, function_name: tupleElement, function_type: ordinary, result_type: Int64 ARGUMENTS LIST id: 10, nodes: 2 FUNCTION id: 11, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 12, nodes: 1 COLUMN id: 13, column_name: b, result_type: Int8, source_id: 7 CONSTANT id: 14, constant_value: UInt64_1, constant_value_type: UInt8 FUNCTION id: 15, function_name: tupleElement, function_type: ordinary, result_type: UInt64 ARGUMENTS LIST id: 16, nodes: 2 FUNCTION id: 11, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 12, nodes: 1 COLUMN id: 13, column_name: b, result_type: Int8, source_id: 7 CONSTANT id: 17, constant_value: UInt64_2, constant_value_type: UInt8 FUNCTION id: 18, function_name: divide, function_type: ordinary, result_type: Float64 ARGUMENTS LIST id: 19, nodes: 2 FUNCTION id: 20, function_name: tupleElement, function_type: ordinary, result_type: Int64 ARGUMENTS LIST id: 21, nodes: 2 FUNCTION id: 11, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 12, nodes: 1 COLUMN id: 13, column_name: b, result_type: Int8, source_id: 7 CONSTANT id: 22, constant_value: UInt64_1, constant_value_type: UInt8 FUNCTION id: 23, function_name: toFloat64, function_type: ordinary, result_type: Float64 ARGUMENTS LIST id: 24, nodes: 1 FUNCTION id: 25, function_name: tupleElement, function_type: ordinary, result_type: UInt64 ARGUMENTS LIST id: 26, nodes: 2 FUNCTION id: 11, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 12, nodes: 1 COLUMN id: 13, column_name: b, result_type: Int8, source_id: 7 CONSTANT id: 27, constant_value: UInt64_2, constant_value_type: UInt8 FUNCTION id: 28, function_name: count, function_type: aggregate, result_type: UInt64 ARGUMENTS LIST id: 29, nodes: 1 FUNCTION id: 30, function_name: plus, function_type: ordinary, result_type: Nullable(Int16) ARGUMENTS LIST id: 31, nodes: 2 COLUMN id: 6, column_name: a, result_type: Nullable(Int8), source_id: 7 CONSTANT id: 32, constant_value: UInt64_1, constant_value_type: UInt8 FUNCTION id: 33, function_name: sum, function_type: aggregate, result_type: Nullable(Int64) ARGUMENTS LIST id: 34, nodes: 1 FUNCTION id: 35, function_name: plus, function_type: ordinary, result_type: Nullable(Int16) ARGUMENTS LIST id: 36, nodes: 2 COLUMN id: 6, column_name: a, result_type: Nullable(Int8), source_id: 7 CONSTANT id: 37, constant_value: UInt64_2, constant_value_type: UInt8 FUNCTION id: 38, function_name: count, function_type: aggregate, result_type: UInt64 ARGUMENTS LIST id: 39, nodes: 1 COLUMN id: 6, column_name: a, result_type: Nullable(Int8), source_id: 7 JOIN TREE TABLE id: 7, table_name: default.fuse_tbl QUERY id: 0 PROJECTION COLUMNS multiply(avg(b), 3) Float64 plus(plus(sum(b), 1), count(b)) Int64 multiply(count(b), count(b)) UInt64 PROJECTION LIST id: 1, nodes: 3 FUNCTION id: 2, function_name: multiply, function_type: ordinary, result_type: Float64 ARGUMENTS LIST id: 3, nodes: 2 FUNCTION id: 4, function_name: divide, function_type: ordinary, result_type: Float64 ARGUMENTS LIST id: 5, nodes: 2 FUNCTION id: 6, function_name: tupleElement, function_type: ordinary, result_type: Int64 ARGUMENTS LIST id: 7, nodes: 2 FUNCTION id: 8, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 9, nodes: 1 COLUMN id: 10, column_name: b, result_type: Int8, source_id: 11 CONSTANT id: 12, constant_value: UInt64_1, constant_value_type: UInt8 FUNCTION id: 13, function_name: toFloat64, function_type: ordinary, result_type: Float64 ARGUMENTS LIST id: 14, nodes: 1 FUNCTION id: 15, function_name: tupleElement, function_type: ordinary, result_type: UInt64 ARGUMENTS LIST id: 16, nodes: 2 FUNCTION id: 8, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 9, nodes: 1 COLUMN id: 10, column_name: b, result_type: Int8, source_id: 11 CONSTANT id: 17, constant_value: UInt64_2, constant_value_type: UInt8 CONSTANT id: 18, constant_value: UInt64_3, constant_value_type: UInt8 FUNCTION id: 19, function_name: plus, function_type: ordinary, result_type: Int64 ARGUMENTS LIST id: 20, nodes: 2 FUNCTION id: 21, function_name: plus, function_type: ordinary, result_type: Int64 ARGUMENTS LIST id: 22, nodes: 2 FUNCTION id: 23, function_name: tupleElement, function_type: ordinary, result_type: Int64 ARGUMENTS LIST id: 24, nodes: 2 FUNCTION id: 8, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 9, nodes: 1 COLUMN id: 10, column_name: b, result_type: Int8, source_id: 11 CONSTANT id: 25, constant_value: UInt64_1, constant_value_type: UInt8 CONSTANT id: 26, constant_value: UInt64_1, constant_value_type: UInt8 FUNCTION id: 27, function_name: tupleElement, function_type: ordinary, result_type: UInt64 ARGUMENTS LIST id: 28, nodes: 2 FUNCTION id: 8, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 9, nodes: 1 COLUMN id: 10, column_name: b, result_type: Int8, source_id: 11 CONSTANT id: 29, constant_value: UInt64_2, constant_value_type: UInt8 FUNCTION id: 30, function_name: multiply, function_type: ordinary, result_type: UInt64 ARGUMENTS LIST id: 31, nodes: 2 FUNCTION id: 32, function_name: tupleElement, function_type: ordinary, result_type: UInt64 ARGUMENTS LIST id: 33, nodes: 2 FUNCTION id: 8, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 9, nodes: 1 COLUMN id: 10, column_name: b, result_type: Int8, source_id: 11 CONSTANT id: 34, constant_value: UInt64_2, constant_value_type: UInt8 FUNCTION id: 35, function_name: tupleElement, function_type: ordinary, result_type: UInt64 ARGUMENTS LIST id: 36, nodes: 2 FUNCTION id: 8, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 9, nodes: 1 COLUMN id: 10, column_name: b, result_type: Int8, source_id: 11 CONSTANT id: 37, constant_value: UInt64_2, constant_value_type: UInt8 JOIN TREE QUERY id: 11, is_subquery: 1 PROJECTION COLUMNS b Int8 PROJECTION LIST id: 38, nodes: 1 COLUMN id: 39, column_name: b, result_type: Int8, source_id: 40 JOIN TREE TABLE id: 40, table_name: default.fuse_tbl QUERY id: 0 PROJECTION COLUMNS sum(b) Int64 count(b) UInt64 PROJECTION LIST id: 1, nodes: 2 FUNCTION id: 2, function_name: tupleElement, function_type: ordinary, result_type: Int64 ARGUMENTS LIST id: 3, nodes: 2 FUNCTION id: 4, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 5, nodes: 1 COLUMN id: 6, column_name: b, result_type: Int64, source_id: 7 CONSTANT id: 8, constant_value: UInt64_1, constant_value_type: UInt8 FUNCTION id: 9, function_name: tupleElement, function_type: ordinary, result_type: UInt64 ARGUMENTS LIST id: 10, nodes: 2 FUNCTION id: 4, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 5, nodes: 1 COLUMN id: 6, column_name: b, result_type: Int64, source_id: 7 CONSTANT id: 11, constant_value: UInt64_2, constant_value_type: UInt8 JOIN TREE QUERY id: 7, is_subquery: 1 PROJECTION COLUMNS b Int64 PROJECTION LIST id: 12, nodes: 1 COLUMN id: 13, column_name: x, result_type: Int64, source_id: 14 JOIN TREE QUERY id: 14, is_subquery: 1 PROJECTION COLUMNS x Int64 count(b) UInt64 PROJECTION LIST id: 15, nodes: 2 FUNCTION id: 16, function_name: tupleElement, function_type: ordinary, result_type: Int64 ARGUMENTS LIST id: 17, nodes: 2 FUNCTION id: 18, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 19, nodes: 1 COLUMN id: 20, column_name: b, result_type: Int8, source_id: 21 CONSTANT id: 22, constant_value: UInt64_1, constant_value_type: UInt8 FUNCTION id: 23, function_name: tupleElement, function_type: ordinary, result_type: UInt64 ARGUMENTS LIST id: 24, nodes: 2 FUNCTION id: 18, function_name: sumCount, function_type: aggregate, result_type: Tuple(Int64, UInt64) ARGUMENTS LIST id: 19, nodes: 1 COLUMN id: 20, column_name: b, result_type: Int8, source_id: 21 CONSTANT id: 25, constant_value: UInt64_2, constant_value_type: UInt8 JOIN TREE TABLE id: 21, table_name: default.fuse_tbl 0 0 nan 0 0 nan 45 10 4.5 Decimal(38, 0) UInt64 Float64 45 10 4.5 Decimal(38, 0) UInt64 Float64