where rank >100
或者 having rank >100 可以,<不行 。
rank > 100 explain
PLAN FRAGMENT 0
OUTPUT EXPRS:
goods_sn[#18]
site_tp[#19]
rank[#20]
PARTITION: HASH_PARTITIONED: site_tp[#17]
""
HAS_COLO_PLAN_NODE: false
""
VRESULT SINK
MYSQL_PROTOCAL
""
7:VANALYTIC(564)
| functions: [row_number()]
| partition by: site_tp[#19]
| window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| predicates: (rank[#20] > 100)
| distribute expr lists: site_tp[#19]
|
6:VSORT(561)
| order by: site_tp[#19] ASC
| offset: 0
| distribute expr lists: site_tp[#17]
|
5:VEXCHANGE
offset: 0
" distribute expr lists: goods_sn[#16], site_tp[#17]"
""
PLAN FRAGMENT 1
""
" PARTITION: HASH_PARTITIONED: goods_sn[#10], site_tp[#11]"
""
HAS_COLO_PLAN_NODE: false
""
STREAM DATA SINK
EXCHANGE ID: 05
HASH_PARTITIONED: site_tp[#17]
""
4:VHASH JOIN(552)
| join op: RIGHT OUTER JOIN(PARTITIONED)[]
| equal join conjunct: (goods_sn[#10] = goods_sn[#4])
| equal join conjunct: (site_tp[#11] = site_tp[#5])
" | runtime filters: RF000[min_max] <- goods_sn[#4](1/1/2048), RF001[bloom] <- goods_sn[#4](1/1/2048), RF002[min_max] <- site_tp[#5](1/1/2048), RF003[bloom] <- site_tp[#5](1/1/2048)"
| cardinality=1
| vec output tuple id: 5
| output tuple id: 5
| vIntermediate tuple ids: 4
| hash output slot ids: 4 5
" | final projections: goods_sn[#14], site_tp[#15]"
| final project output tuple id: 5
" | distribute expr lists: goods_sn[#10], site_tp[#11]"
" | distribute expr lists: goods_sn[#4], site_tp[#5]"
|
|----1:VEXCHANGE
| offset: 0
" | distribute expr lists: goods_sn[#4], site_tp[#5]"
|
3:VEXCHANGE
offset: 0
" distribute expr lists: goods_sn[#10], site_tp[#11]"
""
PLAN FRAGMENT 2
""
" PARTITION: HASH_PARTITIONED: goods_sn[#6], site_tp[#7]"
""
HAS_COLO_PLAN_NODE: false
""
STREAM DATA SINK
EXCHANGE ID: 03
" HASH_PARTITIONED: goods_sn[#10], site_tp[#11]"
""
2:VOlapScanNode(530)
" TABLE: dmp.tag_5274(tag_5274), PREAGGREGATION: ON"
PREDICATES: (site_tp[#7] = 'shein') AND (dt[#9] = '20241016')
" runtime filters: RF000[min_max] -> goods_sn[#6], RF001[bloom] -> goods_sn[#6], RF002[min_max] -> site_tp[#7], RF003[bloom] -> site_tp[#7]"
partitions=1/3 (p20241016)
" tablets=100/100, tabletList=56601,56605,56609 ..."
" cardinality=131818, avgRowSize=0.0, numNodes=1"
pushAggOp=NONE
" final projections: goods_sn[#6], site_tp[#7]"
final project output tuple id: 3
""
PLAN FRAGMENT 3
""
" PARTITION: HASH_PARTITIONED: goods_sn[#0], site_tp[#1]"
""
HAS_COLO_PLAN_NODE: false
""
STREAM DATA SINK
EXCHANGE ID: 01
" HASH_PARTITIONED: goods_sn[#4], site_tp[#5]"
""
0:VOlapScanNode(540)
" TABLE: dmp.tag_2003095(tag_2003095), PREAGGREGATION: ON"
PREDICATES: (site_tp[#1] = 'shein') AND (dt[#3] = '20241105') AND tag_val[#2] IS NOT NULL
partitions=1/1 (p20241105)
" tablets=100/100, tabletList=64264,64268,64272 ..."
" cardinality=-1, avgRowSize=0.0, numNodes=1"
pushAggOp=NONE
" final projections: goods_sn[#0], site_tp[#1]"
final project output tuple id: 1
rank <100 explain
PLAN FRAGMENT 0
OUTPUT EXPRS:
goods_sn[#20]
site_tp[#21]
rank[#22]
PARTITION: HASH_PARTITIONED: site_tp[#19]
""
HAS_COLO_PLAN_NODE: false
""
VRESULT SINK
MYSQL_PROTOCAL
""
8:VANALYTIC(583)
| functions: [row_number()]
| partition by: site_tp[#21]
| window: ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
| predicates: (rank[#22] < 100)
| distribute expr lists: site_tp[#21]
|
7:VSORT(580)
| order by: site_tp[#21] ASC
| offset: 0
| distribute expr lists: site_tp[#19]
|
6:VEXCHANGE
offset: 0
" distribute expr lists: goods_sn[#18], site_tp[#19]"
""
PLAN FRAGMENT 1
""
" PARTITION: HASH_PARTITIONED: goods_sn[#10], site_tp[#11]"
""
HAS_COLO_PLAN_NODE: false
""
STREAM DATA SINK
EXCHANGE ID: 06
HASH_PARTITIONED: site_tp[#19]
""
5:VPartitionTopN(574)
| functions: row_number
| partition by: site_tp[#17]
| order by:
| has global limit: false
| partition limit: 99
| partition topn phase: TWO_PHASE_LOCAL_PTOPN
" | distribute expr lists: goods_sn[#16], site_tp[#17]"
|
4:VHASH JOIN(568)
| join op: RIGHT OUTER JOIN(PARTITIONED)[]
| equal join conjunct: (goods_sn[#10] = goods_sn[#4])
| equal join conjunct: (site_tp[#11] = site_tp[#5])
" | runtime filters: RF000[min_max] <- goods_sn[#4](1/1/2048), RF001[bloom] <- goods_sn[#4](1/1/2048), RF002[min_max] <- site_tp[#5](1/1/2048), RF003[bloom] <- site_tp[#5](1/1/2048)"
| cardinality=1
| vec output tuple id: 5
| output tuple id: 5
| vIntermediate tuple ids: 4
| hash output slot ids: 4 5
" | final projections: goods_sn[#14], site_tp[#15]"
| final project output tuple id: 5
" | distribute expr lists: goods_sn[#10], site_tp[#11]"
" | distribute expr lists: goods_sn[#4], site_tp[#5]"
|
|----1:VEXCHANGE
| offset: 0
" | distribute expr lists: goods_sn[#4], site_tp[#5]"
|
3:VEXCHANGE
offset: 0
" distribute expr lists: goods_sn[#10], site_tp[#11]"
""
PLAN FRAGMENT 2
""
" PARTITION: HASH_PARTITIONED: goods_sn[#6], site_tp[#7]"
""
HAS_COLO_PLAN_NODE: false
""
STREAM DATA SINK
EXCHANGE ID: 03
" HASH_PARTITIONED: goods_sn[#10], site_tp[#11]"
""
2:VOlapScanNode(546)
" TABLE: dmp.tag_5274(tag_5274), PREAGGREGATION: ON"
PREDICATES: (site_tp[#7] = 'shein') AND (dt[#9] = '20241016')
" runtime filters: RF000[min_max] -> goods_sn[#6], RF001[bloom] -> goods_sn[#6], RF002[min_max] -> site_tp[#7], RF003[bloom] -> site_tp[#7]"
partitions=1/3 (p20241016)
" tablets=100/100, tabletList=56601,56605,56609 ..."
" cardinality=131818, avgRowSize=0.0, numNodes=1"
pushAggOp=NONE
" final projections: goods_sn[#6], site_tp[#7]"
final project output tuple id: 3
""
PLAN FRAGMENT 3
""
" PARTITION: HASH_PARTITIONED: goods_sn[#0], site_tp[#1]"
""
HAS_COLO_PLAN_NODE: false
""
STREAM DATA SINK
EXCHANGE ID: 01
" HASH_PARTITIONED: goods_sn[#4], site_tp[#5]"
""
0:VOlapScanNode(556)
" TABLE: dmp.tag_2003095(tag_2003095), PREAGGREGATION: ON"
PREDICATES: (site_tp[#1] = 'shein') AND (dt[#3] = '20241105') AND tag_val[#2] IS NOT NULL
partitions=1/1 (p20241105)
" tablets=100/100, tabletList=64264,64268,64272 ..."
" cardinality=-1, avgRowSize=0.0, numNodes=1"
pushAggOp=NONE
" final projections: goods_sn[#0], site_tp[#1]"
final project output tuple id: 1