sanjeet006py commented on code in PR #2177:
URL: https://github.com/apache/phoenix/pull/2177#discussion_r2154943020


##########
phoenix-core/src/it/java/org/apache/phoenix/jdbc/LoggingConnectionLimiterIT.java:
##########
@@ -199,6 +200,35 @@ public void testActivityLogsOnQueryWhenFailures() throws 
Exception {
 
     }
 
+    @Test
+    public void testQueryExplainPlan() throws Exception {
+
+        String query = "SELECT * FROM " + tableName; //FULL SCAN
+
+        if(getConnection() instanceof PhoenixConnection) {
+            try (PhoenixConnection pconn = 
getConnection().unwrap(PhoenixConnection.class); Statement stmt = 
pconn.createStatement()) {
+                ResultSet rs = stmt.executeQuery(query);
+                while (rs.next()) {
+                    //  do nothing
+                }
+                boolean queryPlanFound = false;
+                String queryPlan = 
pconn.getActivityLogger().getExplainPlanInfo();
+                if (queryPlan != null && queryPlan.contains("FULL SCAN"))
+                    queryPlanFound = true;

Review Comment:
   How about asserting on the `regions` and `hostnames` output?



-- 
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: issues-unsubscr...@phoenix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to