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

    https://github.com/apache/phoenix/pull/215#discussion_r82688259
  
    --- 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 --
    
    I wondered about this myself. While I didn't encounter any cases where 
exception levels varied, it's a good idea to account for it. Will make these 
changes, thanks @maryannxue


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