Skip to content

Commit 27fa7db

Browse files
committed
for test
1 parent 22c37b3 commit 27fa7db

File tree

3 files changed

+25
-15
lines changed

3 files changed

+25
-15
lines changed

src/query/service/src/pipelines/processors/transforms/recluster/recluster_partition_exchange.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,22 @@ use crate::pipelines::processors::transforms::WindowPartitionMeta;
2424
pub struct ReclusterPartitionExchange {
2525
start: u64,
2626
width: usize,
27+
start_time: Instant,
2728
}
2829

2930
impl ReclusterPartitionExchange {
3031
pub fn create(start: u64, width: usize) -> Arc<ReclusterPartitionExchange> {
31-
Arc::new(ReclusterPartitionExchange { start, width })
32+
Arc::new(ReclusterPartitionExchange {
33+
start,
34+
width,
35+
start_time: Instant::now(),
36+
})
3237
}
3338
}
3439

3540
impl Exchange for ReclusterPartitionExchange {
3641
const NAME: &'static str = "Recluster";
3742
fn partition(&self, mut data_block: DataBlock, n: usize) -> Result<Vec<DataBlock>> {
38-
let start = Instant::now();
3943
let range_ids = data_block
4044
.get_last_column()
4145
.as_number()
@@ -60,7 +64,7 @@ impl Exchange for ReclusterPartitionExchange {
6064
output_data_blocks[target].push((partition_id, block));
6165
}
6266
}
63-
log::info!("Recluster range exchange: {:?}", start.elapsed());
67+
log::info!("Recluster range exchange: {:?}", self.start_time.elapsed());
6468

6569
// Union data blocks for each processor.
6670
Ok(output_data_blocks

src/query/service/src/pipelines/processors/transforms/recluster/transform_recluster_partition.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ impl Processor for TransformReclusterPartition {
162162
fn process(&mut self) -> Result<()> {
163163
match std::mem::replace(&mut self.step, Step::Consume) {
164164
Step::Collect => {
165+
let start_cost = self.start.elapsed();
165166
let data_block = self.input.pull_data().unwrap()?;
166167
if let Some(meta) = data_block
167168
.get_owned_meta()
@@ -212,6 +213,11 @@ impl Processor for TransformReclusterPartition {
212213
}
213214
}
214215
}
216+
log::info!(
217+
"Recluster: start collect: {:?}, end: {:?}",
218+
start_cost,
219+
self.start.elapsed()
220+
);
215221
}
216222
Step::Flush => {
217223
while let Some(mut partition_data) = self.partition_data.pop() {

tests/sqllogictests/suites/mode/standalone/explain/window.test

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ digraph {
5959
2 [ label = "DeserializeDataTransform" ]
6060
3 [ label = "ShufflePartition(Window)" ]
6161
4 [ label = "ShuffleMergePartition(Window)" ]
62-
5 [ label = "TransformWindowPartitionCollect(Sort)" ]
62+
5 [ label = "TransformPartitionCollect(Window)" ]
6363
6 [ label = "Transform Window" ]
6464
7 [ label = "Resize" ]
6565
8 [ label = "SortPartialTransform" ]
@@ -108,7 +108,7 @@ digraph {
108108
2 [ label = "DeserializeDataTransform" ]
109109
3 [ label = "ShufflePartition(Window)" ]
110110
4 [ label = "ShuffleMergePartition(Window)" ]
111-
5 [ label = "TransformWindowPartitionCollect(Sort)" ]
111+
5 [ label = "TransformPartitionCollect(Window)" ]
112112
6 [ label = "Transform Window" ]
113113
7 [ label = "Resize" ]
114114
8 [ label = "SortPartialTransform" ]
@@ -429,7 +429,7 @@ digraph {
429429
2 [ label = "DeserializeDataTransform" ]
430430
3 [ label = "ShufflePartition(Window)" ]
431431
4 [ label = "ShuffleMergePartition(Window)" ]
432-
5 [ label = "TransformWindowPartitionCollect(Sort)" ]
432+
5 [ label = "TransformPartitionCollect(Window)" ]
433433
6 [ label = "Transform Window" ]
434434
7 [ label = "LimitTransform" ]
435435
8 [ label = "CompoundBlockOperator(Project)" ]
@@ -457,7 +457,7 @@ digraph {
457457
2 [ label = "DeserializeDataTransform" ]
458458
3 [ label = "ShufflePartition(Window)" ]
459459
4 [ label = "ShuffleMergePartition(Window)" ]
460-
5 [ label = "TransformWindowPartitionCollect(Sort)" ]
460+
5 [ label = "TransformPartitionCollect(Window)" ]
461461
6 [ label = "Transform Window" ]
462462
7 [ label = "LimitTransform" ]
463463
8 [ label = "CompoundBlockOperator(Project)" ]
@@ -486,7 +486,7 @@ digraph {
486486
2 [ label = "DeserializeDataTransform" ]
487487
3 [ label = "ShufflePartition(Window)" ]
488488
4 [ label = "ShuffleMergePartition(Window)" ]
489-
5 [ label = "TransformWindowPartitionCollect(Sort)" ]
489+
5 [ label = "TransformPartitionCollect(Window)" ]
490490
6 [ label = "Transform Window" ]
491491
7 [ label = "LimitTransform" ]
492492
8 [ label = "CompoundBlockOperator(Project)" ]
@@ -510,7 +510,7 @@ digraph {
510510
2 [ label = "DeserializeDataTransform" ]
511511
3 [ label = "ShufflePartition(Window)" ]
512512
4 [ label = "ShuffleMergePartition(Window)" ]
513-
5 [ label = "TransformWindowPartitionCollect(Sort)" ]
513+
5 [ label = "TransformPartitionCollect(Window)" ]
514514
6 [ label = "Transform Window" ]
515515
7 [ label = "LimitTransform" ]
516516
8 [ label = "CompoundBlockOperator(Project)" ]
@@ -534,7 +534,7 @@ digraph {
534534
2 [ label = "DeserializeDataTransform" ]
535535
3 [ label = "ShufflePartition(Window)" ]
536536
4 [ label = "ShuffleMergePartition(Window)" ]
537-
5 [ label = "TransformWindowPartitionCollect(Sort)" ]
537+
5 [ label = "TransformPartitionCollect(Window)" ]
538538
6 [ label = "Transform Window" ]
539539
7 [ label = "LimitTransform" ]
540540
8 [ label = "CompoundBlockOperator(Project)" ]
@@ -559,7 +559,7 @@ digraph {
559559
2 [ label = "DeserializeDataTransform" ]
560560
3 [ label = "ShufflePartition(Window)" ]
561561
4 [ label = "ShuffleMergePartition(Window)" ]
562-
5 [ label = "TransformWindowPartitionCollect(Sort)" ]
562+
5 [ label = "TransformPartitionCollect(Window)" ]
563563
6 [ label = "Transform Window" ]
564564
7 [ label = "Resize" ]
565565
8 [ label = "SortPartialTransform" ]
@@ -610,7 +610,7 @@ digraph {
610610
4 [ label = "TransformFilter" ]
611611
5 [ label = "ShufflePartition(Window)" ]
612612
6 [ label = "ShuffleMergePartition(Window)" ]
613-
7 [ label = "TransformWindowPartitionCollect(Sort)" ]
613+
7 [ label = "TransformPartitionCollect(Window)" ]
614614
8 [ label = "Transform Window" ]
615615
9 [ label = "Resize" ]
616616
10 [ label = "SortPartialTransform" ]
@@ -708,7 +708,7 @@ digraph {
708708
2 [ label = "DeserializeDataTransform" ]
709709
3 [ label = "ShufflePartition(WindowTopN)" ]
710710
4 [ label = "ShuffleMergePartition(WindowTopN)" ]
711-
5 [ label = "TransformWindowPartitionCollect(Sort)" ]
711+
5 [ label = "TransformPartitionCollect(Window)" ]
712712
6 [ label = "Transform Window" ]
713713
7 [ label = "TransformFilter" ]
714714
8 [ label = "LimitTransform" ]
@@ -786,12 +786,12 @@ digraph {
786786
1 [ label = "CompoundBlockOperator(Map)" ]
787787
2 [ label = "ShufflePartition(Window)" ]
788788
3 [ label = "ShuffleMergePartition(Window)" ]
789-
4 [ label = "TransformWindowPartitionCollect(Sort)" ]
789+
4 [ label = "TransformPartitionCollect(Window)" ]
790790
5 [ label = "Transform Window" ]
791791
6 [ label = "CompoundBlockOperator(Map)" ]
792792
7 [ label = "ShufflePartition(Window)" ]
793793
8 [ label = "ShuffleMergePartition(Window)" ]
794-
9 [ label = "TransformWindowPartitionCollect(Sort)" ]
794+
9 [ label = "TransformPartitionCollect(Window)" ]
795795
10 [ label = "Transform Window" ]
796796
11 [ label = "CompoundBlockOperator(Project)" ]
797797
0 -> 1 [ label = "" ]

0 commit comments

Comments
 (0)