mihaibudiu commented on code in PR #4417:
URL: https://github.com/apache/calcite/pull/4417#discussion_r2153607239
##########
core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java:
##########
@@ -7236,6 +7236,30 @@ public SqlNode go(SqlNode root) {
() -> this + " returned null for " + root);
}
+ /** True if the exception ex indicates that name lookup has failed. */
+ public static boolean isNotFoundException(Exception ex) {
+ if (!(ex instanceof CalciteContextException)) {
+ return false;
+ }
+ String message = ex.getMessage();
+ if (message != null && !message.contains("not found")) {
Review Comment:
turns out that StringUtils.contains does not work, since it is not annotated
with `@Nullable`, and thus is causes the CheckedFramework to reject the program.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]