michaelmior commented on a change in pull request #1319: [CALCITE-3195] Handle
UDF that throws checked exceptions in enumerable code generator
URL: https://github.com/apache/calcite/pull/1319#discussion_r306861062
##########
File path:
linq4j/src/main/java/org/apache/calcite/linq4j/tree/TryStatement.java
##########
@@ -36,7 +37,17 @@ public TryStatement(Statement body, List<CatchBlock>
catchBlocks,
}
@Override public Statement accept(Shuttle shuttle) {
- return shuttle.visit(this);
+ shuttle = shuttle.preVisit(this);
+ Statement body1 = body.accept(shuttle);
+ List<CatchBlock> catchBlocks1 = new ArrayList<>();
+ for (CatchBlock cb: catchBlocks) {
+ Statement cbBody = cb.body.accept(shuttle);
+ catchBlocks1.add(
+ Expressions.catch_(cb.parameter, cbBody));
+ }
+ Statement fynally1 =
+ fynally == null ? null : fynally.accept(shuttle);
Review comment:
Of course. This slipped my mind when reviewing :)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services