Jackie-Jiang commented on code in PR #15136: URL: https://github.com/apache/pinot/pull/15136#discussion_r1972266435
########## pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/HybridClusterIntegrationTest.java: ########## @@ -342,6 +342,36 @@ public void testDropResults(boolean useMultiStageQueryEngine) Assert.assertTrue(postQueryWithOptions(query, "dropResults=truee").has(resultTag)); } + @Test(dataProvider = "useBothQueryEngines") + public void testExplainDropResults(boolean useMultiStageQueryEngine) + throws Exception { + setUseMultiStageQueryEngine(useMultiStageQueryEngine); + final String resultTag = "resultTable"; Review Comment: (nit, convention) We don't usually use `final` for local var ########## pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/HybridClusterIntegrationTest.java: ########## @@ -342,6 +342,36 @@ public void testDropResults(boolean useMultiStageQueryEngine) Assert.assertTrue(postQueryWithOptions(query, "dropResults=truee").has(resultTag)); } + @Test(dataProvider = "useBothQueryEngines") + public void testExplainDropResults(boolean useMultiStageQueryEngine) + throws Exception { + setUseMultiStageQueryEngine(useMultiStageQueryEngine); + final String resultTag = "resultTable"; + String query = String.format("EXPLAIN PLAN FOR SELECT * FROM %s limit 10", getTableName()); + + // dropResults=true - resultTable must be in the response (it is a query plan) + JsonNode jsonNode = postQueryWithOptions(query, "dropResults=true"); + Assert.assertTrue(jsonNode.has(resultTag)); + query = String.format("EXPLAIN PLAN WITHOUT IMPLEMENTATION FOR SELECT * FROM %s limit 10", getTableName()); + + // dropResults=true - resultTable must be in the response (it is a query plan) + jsonNode = postQueryWithOptions(query, "dropResults=true"); + Assert.assertTrue(jsonNode.has(resultTag)); + + query = String.format("EXPLAIN IMPLEMENTATION PLAN FOR SELECT * FROM %s limit 10", getTableName()); + + // dropResults=true - resultTable must be in the response (it is a query plan) + jsonNode = postQueryWithOptions(query, "dropResults=true"); + Assert.assertTrue(jsonNode.has(resultTag)); + + query = String.format("EXPLAIN PLAN FOR SELECT 1 + 1 FROM %s limit 10", getTableName()); + + // dropResults=true - resultTable must be in the response (it is a query plan) + jsonNode = postQueryWithOptions(query, "dropResults=true"); + Assert.assertTrue(jsonNode.has(resultTag)); + Review Comment: (nit) Remove empty line -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org