davidradl commented on code in PR #27287:
URL: https://github.com/apache/flink/pull/27287#discussion_r2576692886


##########
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/functions/inference/TypeInferenceOperandInference.java:
##########
@@ -81,9 +81,14 @@ public void inferOperandTypes(
                     false)) {
                 inferOperandTypesOrError(unwrapTypeFactory(callBinding), 
callContext, operandTypes);
             }
-        } catch (ValidationException | CalciteContextException e) {
+        } catch (ValidationException e) {
             // let operand checker fail
+        } catch (CalciteContextException e) {
+            throw e;
         } catch (Throwable t) {
+            if (t.getCause() instanceof CalciteContextException) {

Review Comment:
   I am curious, do we need to check down the chain of causes for a match, 
rather than the first cause? I am not sure if we can get into this situation, 
where the cause of the cause is a CalciteContextException or the like. Maybe 
using [this 
code](https://github.com/apache/flink/blob/e42cdd1efe354d406c8791f319292d3b185d9281/flink-core/src/main/java/org/apache/flink/util/ExceptionUtils.java#L473)



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

Reply via email to