virajjasani commented on code in PR #2246:
URL: https://github.com/apache/phoenix/pull/2246#discussion_r2234985340
##########
phoenix-core/src/it/java/org/apache/phoenix/jdbc/LoggingConnectionLimiterIT.java:
##########
@@ -186,6 +187,55 @@ 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();
Review Comment:
Can we add a test in some other IT class where we can validate that
queryPlan is null by default?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]