This is an automated email from the ASF dual-hosted git repository.

vogievetsky pushed a commit to branch 25.0.0
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/25.0.0 by this push:
     new b8b9bd2956 fix preview droping out of MSQ mode (#13587)
b8b9bd2956 is described below

commit b8b9bd29567e5e678c09375805994315edfb0609
Author: Vadim Ogievetsky <[email protected]>
AuthorDate: Fri Dec 16 15:13:13 2022 -0800

    fix preview droping out of MSQ mode (#13587)
---
 .../druid-models/workbench-query/workbench-query.spec.ts   |  1 -
 .../src/druid-models/workbench-query/workbench-query.ts    | 14 ++++----------
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git 
a/web-console/src/druid-models/workbench-query/workbench-query.spec.ts 
b/web-console/src/druid-models/workbench-query/workbench-query.spec.ts
index 9af0fb2407..c1af666aad 100644
--- a/web-console/src/druid-models/workbench-query/workbench-query.spec.ts
+++ b/web-console/src/druid-models/workbench-query/workbench-query.spec.ts
@@ -157,7 +157,6 @@ describe('WorkbenchQuery', () => {
             '[{"name":"timestamp","type":"string"}]'
           )
         )
-        ORDER BY FLOOR("__time" TO HOUR), browser, session
       `);
     });
   });
diff --git a/web-console/src/druid-models/workbench-query/workbench-query.ts 
b/web-console/src/druid-models/workbench-query/workbench-query.ts
index b6a1f74aa1..260b131b72 100644
--- a/web-console/src/druid-models/workbench-query/workbench-query.ts
+++ b/web-console/src/druid-models/workbench-query/workbench-query.ts
@@ -464,10 +464,10 @@ export class WorkbenchQuery {
       }
     }
 
-    // Adjust the context, remove maxNumTasks and add in ingest mode flags
-    const cleanContext = deleteKeys(this.queryContext, ['maxNumTasks']);
-    ret = ret.changeQueryContext({
-      ...cleanContext,
+    // Explicitly select MSQ, adjust the context, set maxNumTasks to the 
lowest possible and add in ingest mode flags
+    ret = ret.changeEngine('sql-msq-task').changeQueryContext({
+      ...this.queryContext,
+      maxNumTasks: 2,
       finalizeAggregations: false,
       groupByEnableMultiValueUnnesting: false,
     });
@@ -479,12 +479,6 @@ export class WorkbenchQuery {
           .changeReplaceClause(undefined)
           .changePartitionedByClause(undefined)
           .changeClusteredByClause(undefined)
-          .changeOrderByClause(
-            WorkbenchQuery.makeOrderByClause(
-              parsedQuery.partitionedByClause,
-              parsedQuery.clusteredByClause,
-            ),
-          )
           .toString()
       : WorkbenchQuery.commentOutIngestParts(this.getQueryString());
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to