You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by go...@apache.org on 2024/11/19 10:25:22 UTC

(pinot) branch master updated: Show multi-stage engine explain plan for integration test query failures with the multi-stage query engine (#14475)

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 <ya...@gmail.com>
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: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org