File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/query/service/src/interpreters Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,20 @@ pub trait Interpreter: Sync + Send {
45
45
46
46
/// The core of the databend processor which will execute the logical plan and get the DataBlock
47
47
async fn execute ( & self , ctx : Arc < QueryContext > ) -> Result < SendableDataBlockStream > {
48
- let build_res = self . execute2 ( ) . await ?;
48
+ let mut build_res = self . execute2 ( ) . await ?;
49
+
50
+ if build_res. main_pipeline . pipes . is_empty ( ) {
51
+ return Ok ( Box :: pin ( DataBlockStream :: create (
52
+ self . schema ( ) ,
53
+ None ,
54
+ vec ! [ ] ,
55
+ ) ) ) ;
56
+ }
49
57
50
58
let settings = ctx. get_settings ( ) ;
51
59
let query_need_abort = ctx. query_need_abort ( ) ;
52
60
let executor_settings = ExecutorSettings :: try_create ( & settings) ?;
61
+ build_res. set_max_threads ( settings. get_max_threads ( ) ? as usize ) ;
53
62
54
63
if build_res. main_pipeline . is_complete_pipeline ( ) ? {
55
64
let mut pipelines = build_res. sources_pipelines ;
You can’t perform that action at this time.
0 commit comments