Alan Jackoway created HIVE-4408:
-----------------------------------

             Summary: Implement HivePreparedStatement.toString
                 Key: HIVE-4408
                 URL: https://issues.apache.org/jira/browse/HIVE-4408
             Project: Hive
          Issue Type: Improvement
          Components: JDBC
    Affects Versions: 0.10.0
            Reporter: Alan Jackoway
            Priority: Minor


I was doing some development using HivePreparedStatement to create queries 
using JDBC. It would have helped me debug some issues if I could get the 
generated SQL out from the HivePreparedStatement object.

Based on the existing code, I believe the following code would work. I have not 
tested it however, as I had trouble getting hive compiling.

{noformat}
  public String toString() {
    if (sql.contains("?")) {
      return updateSql(sql, parameters);
    }
    return sql;
  } 
{noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to