EXPLAIN
SELECT
first_prop_dim AS keyword,
SUM (COUNT) AS clause_cnt
FROM
(
SELECT
first_prop_dim,
emotion_term,
COUNT(DISTINCT clause.comment_id, emotion_term, terminal_prop_dim) AS 'count'
FROM
view_comment_clause clause
WHERE
clause.goods_id IN ('684005614244')
AND clause.first_prop_dim NOT IN (
'消费者特征',
'购买行为',
'使用情况',
'品牌印象',
'回购意愿',
'推荐意愿',
'整体评价',
'产品对比',
'其他维度'
)
AND (clause.comment_time BETWEEN '2023-01-01' AND '2023-03-31')
AND first_prop_dim IS NOT NULL
GROUP BY
first_prop_dim
,emotion_term
) arr
GROUP BY
first_prop_dim
;
Explain String
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
PLAN FRAGMENT 0
OUTPUT EXPRS:5: first_prop_dim | 27: sum
PARTITION: UNPARTITIONED
RESULT SINK
10:EXCHANGE
PLAN FRAGMENT 1
OUTPUT EXPRS:
PARTITION: HASH_PARTITIONED: 5: first_prop_dim
STREAM DATA SINK
EXCHANGE ID: 10
UNPARTITIONED
9:AGGREGATE (merge finalize)
| output: sum(27: sum)
| group by: 5: first_prop_dim
|
8:EXCHANGE
PLAN FRAGMENT 2
OUTPUT EXPRS:
PARTITION: HASH_PARTITIONED: 5: first_prop_dim, 12: emotion_term
STREAM DATA SINK
EXCHANGE ID: 08
HASH_PARTITIONED: 5: first_prop_dim
7:AGGREGATE (update serialize)
| STREAMING
| output: sum(26: count)
| group by: 5: first_prop_dim
|
6:Project
| <slot 5> : 5: first_prop_dim
| <slot 26> : 26: count
|
5:AGGREGATE (update finalize)
| output: count(if(2: comment_id IS NULL, NULL, if(12: emotion_term IS NULL, NULL, 8: terminal_prop_dim)))
| group by: 5: first_prop_dim, 12: emotion_term
|
4:AGGREGATE (merge serialize)
| group by: 2: comment_id, 5: first_prop_dim, 8: terminal_prop_dim, 12: emotion_term
|
3:EXCHANGE
PLAN FRAGMENT 3
OUTPUT EXPRS:
PARTITION: RANDOM
STREAM DATA SINK
EXCHANGE ID: 03
HASH_PARTITIONED: 5: first_prop_dim, 12: emotion_term
2:AGGREGATE (update serialize)
| STREAMING
| group by: 2: comment_id, 5: first_prop_dim, 8: terminal_prop_dim, 12: emotion_term
|
1:Project
| <slot 2> : 2: comment_id
| <slot 5> : 5: first_prop_dim
| <slot 8> : 8: terminal_prop_dim
| <slot 12> : 12: emotion_term
|
0:OlapScanNode
TABLE: view_comment_clause
PREAGGREGATION: ON
PREDICATES: 1: goods_id = 684005614244, 5: first_prop_dim NOT IN ('消费者特征', '购买行为', '使用情况', '品牌印象', '回购意愿', '推荐意愿', '整体评价', '产品对比', '其他维度'), 3: comment_time <= '2023-03-31 00:00:00', 5: first_prop_dim IS NOT NULL
partitions=3/108
rollup: view_comment_clause
tabletRatio=3/18
tabletList=703985,704009,704033
cardinality=7960315
avgRowSize=6.0
numNodes=0