File tree Expand file tree Collapse file tree 3 files changed +14
-6
lines changed
src/query/service/src/pipelines/builders
tests/sqllogictests/suites/base/09_fuse_engine Expand file tree Collapse file tree 3 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -107,8 +107,8 @@ impl PipelineBuilder {
107107 SortStep :: Single => {
108108 // Build for single node mode.
109109 // We build the full sort pipeline for it.
110- if max_threads == 1 {
111- self . main_pipeline . try_resize ( 1 ) ?;
110+ if self . main_pipeline . output_len ( ) == 1 || max_threads == 1 {
111+ self . main_pipeline . try_resize ( max_threads ) ?;
112112 }
113113 builder
114114 . remove_order_col_at_last ( )
@@ -119,8 +119,8 @@ impl PipelineBuilder {
119119 // Build for each cluster node.
120120 // We build the full sort pipeline for it.
121121 // Don't remove the order column at last.
122- if max_threads == 1 {
123- self . main_pipeline . try_resize ( 1 ) ?;
122+ if self . main_pipeline . output_len ( ) == 1 || max_threads == 1 {
123+ self . main_pipeline . try_resize ( max_threads ) ?;
124124 }
125125 builder. build_full_sort_pipeline ( & mut self . main_pipeline )
126126 }
@@ -143,8 +143,8 @@ impl PipelineBuilder {
143143 }
144144
145145 SortStep :: Sample => {
146- if max_threads == 1 {
147- self . main_pipeline . try_resize ( 1 ) ?;
146+ if self . main_pipeline . output_len ( ) == 1 || max_threads == 1 {
147+ self . main_pipeline . try_resize ( max_threads ) ?;
148148 }
149149 builder. build_sample ( & mut self . main_pipeline ) ?;
150150 self . exchange_injector = TransformSortBuilder :: exchange_injector ( ) ;
Original file line number Diff line number Diff line change 1+ # SortBoundBroadcast deadlock
2+ statement ok
3+ set enable_shuffle_sort = 0;
4+
15statement ok
26DROP DATABASE IF EXISTS db_09_0020
37
Original file line number Diff line number Diff line change 1+ # SortBoundBroadcast deadlock
2+ statement ok
3+ set enable_shuffle_sort = 0;
4+
15statement ok
26create or replace database issue_17314;
37
You can’t perform that action at this time.
0 commit comments