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

    https://github.com/apache/phoenix/pull/215#discussion_r82853555
  
    --- 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 --
    
    The new changes go for the deepest SQL exception. Can quickly change it if 
you would like only the next most deep SQL exception.


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