Github user lomoree commented on a diff in the pull request: https://github.com/apache/phoenix/pull/215#discussion_r83024234 --- Diff: phoenix-core/src/main/java/org/apache/phoenix/calcite/CalciteUtils.java --- @@ -1120,8 +1120,11 @@ public static SQLException unwrapSqlException(SQLException root){ Exception e = root; while(e.getCause() != null){ e = (Exception) e.getCause(); + if(e instanceof RuntimeException && e.getCause() instanceof SQLException) { --- End diff -- Latest changes attempt to locate the nested SQLException within an RuntimeException. We still throw the first SQLException seen in case there's no wrapping argument exception. And if no matches are found, we throw the root so as to avoid unexpected behavior.
--- 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. ---