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

    https://github.com/apache/phoenix/pull/215#discussion_r82686793
  
    --- Diff: 
phoenix-core/src/main/java/org/apache/calcite/jdbc/PhoenixCalciteFactory.java 
---
    @@ -161,6 +162,29 @@ public Object apply(
                 }));
             }
     
    +        public CalciteStatement createStatement(String sql, int 
resultSetType, int resultSetConcurrency, int resultSetHoldability) throws 
SQLException {
    +            try {
    +                return super.createStatement(resultSetType, 
resultSetConcurrency, resultSetHoldability);
    +            } catch (SQLException e) {
    +                if (e.getCause().getCause() instanceof SQLException) {
    +                    throw (SQLException) e.getCause().getCause();
    --- End diff --
    
    Can we can have a utility method that unwraps the Exception? And as we 
might different number of levels of Exception wrapping, can we just look down 
one level at a time till we hit an instance of SQLException?


---
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