Github user codymarcel commented on a diff in the pull request:

    https://github.com/apache/phoenix/pull/115#discussion_r38472866
  
    --- Diff: 
phoenix-pherf/src/main/java/org/apache/phoenix/pherf/util/PhoenixUtil.java ---
    @@ -274,4 +274,34 @@ public void updatePhoenixStats(String tableName, 
Scenario scenario) throws Excep
             logger.info("Updating stats for " + tableName);
             executeStatement("UPDATE STATISTICS " + tableName, scenario);
         }
    +    
    +    /**
    +     * Get explain plan for a query
    +     *
    +     * @param query
    +     * @return
    +     * @throws SQLException
    +     */
    +    public String getExplainPlan(Query query) throws SQLException {
    +        Connection conn = null;
    +        ResultSet rs = null;
    +        PreparedStatement statement = null;
    +        StringBuilder buf = new StringBuilder();
    +        try {
    --- End diff --
    
    You might want to consider using the JdbcSession() to handle all the boiler 
plate try/catch/finally stuff on the connection. 
    
    Check out testRWWorkload()
    
https://github.com/apache/phoenix/blob/master/phoenix-pherf/src/it/java/org/apache/phoenix/pherf/DataIngestIT.java


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to