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

gortiz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 3fea2a2b20 Show multi-stage engine explain plan for integration test 
query failures with the multi-stage query engine (#14475)
3fea2a2b20 is described below

commit 3fea2a2b2048e0b288c55a7bdcfd6c49d10664e0
Author: Yash Mayya <[email protected]>
AuthorDate: Tue Nov 19 17:25:15 2024 +0700

    Show multi-stage engine explain plan for integration test query failures 
with the multi-stage query engine (#14475)
---
 .../integration/tests/ClusterIntegrationTestUtils.java  | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git 
a/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/ClusterIntegrationTestUtils.java
 
b/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/ClusterIntegrationTestUtils.java
index a97efe4cb3..299d60c754 100644
--- 
a/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/ClusterIntegrationTestUtils.java
+++ 
b/pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/ClusterIntegrationTestUtils.java
@@ -799,7 +799,7 @@ public class ClusterIntegrationTestUtils {
             if (pinotNumRecordsSelected != 0) {
               throw new RuntimeException("No record selected in H2 but " + 
pinotNumRecordsSelected
                   + " records selected in Pinot, explain plan: " + 
getExplainPlan(pinotQuery, queryResourceUrl, headers,
-                  extraJsonProperties));
+                  extraJsonProperties, useMultiStageQueryEngine));
             }
 
             // Skip further comparison
@@ -822,7 +822,7 @@ public class ClusterIntegrationTestUtils {
             throw new RuntimeException(
                 "Value: " + c + " does not match, expected: " + h2Value + ", 
got broker value: " + brokerValue
                     + ", got client value:" + connectionValue + ", explain 
plan: " + getExplainPlan(pinotQuery,
-                    queryResourceUrl, headers, extraJsonProperties));
+                    queryResourceUrl, headers, extraJsonProperties, 
useMultiStageQueryEngine));
           }
         }
       } else {
@@ -846,7 +846,7 @@ public class ClusterIntegrationTestUtils {
                   throw new RuntimeException(
                       "Value: " + c + " does not match, expected: " + h2Value 
+ ", got broker value: " + brokerValue
                           + ", got client value:" + connectionValue + ", 
explain plan: " + getExplainPlan(pinotQuery,
-                          queryResourceUrl, headers, extraJsonProperties));
+                          queryResourceUrl, headers, extraJsonProperties, 
useMultiStageQueryEngine));
                 }
               }
               if (!h2ResultSet.next()) {
@@ -860,12 +860,13 @@ public class ClusterIntegrationTestUtils {
   }
 
   private static String getExplainPlan(@Language("sql") String pinotQuery, 
String brokerUrl,
-      @Nullable Map<String, String> headers, @Nullable Map<String, String> 
extraJsonProperties)
+      @Nullable Map<String, String> headers, @Nullable Map<String, String> 
extraJsonProperties,
+      boolean useMultiStageQueryEngine)
       throws Exception {
-    JsonNode explainPlanForResponse =
-        ClusterTest.postQuery("explain plan for " + pinotQuery, 
getBrokerQueryApiUrl(brokerUrl, false), headers,
-            extraJsonProperties);
-    return ExplainPlanUtils.formatExplainPlan(explainPlanForResponse);
+    JsonNode explainPlanForResponse = ClusterTest.postQuery("explain plan for 
" + pinotQuery,
+        getBrokerQueryApiUrl(brokerUrl, useMultiStageQueryEngine), headers, 
extraJsonProperties);
+    return useMultiStageQueryEngine ? 
ExplainPlanUtils.formatMultiStageExplainPlan(explainPlanForResponse)
+        : ExplainPlanUtils.formatExplainPlan(explainPlanForResponse);
   }
 
   public static String getBrokerQueryApiUrl(String brokerBaseApiUrl, boolean 
useMultiStageQueryEngine) {


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

Reply via email to