You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2019/07/24 12:43:03 UTC

[GitHub] [calcite] DonnyZone commented on a change in pull request #1319: [CALCITE-3195] Handle UDF that throws checked exceptions in enumerable code generator

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

 ##########
 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:
   @michaelmior Thanks for review! I addressed your comments. 
   As "finally" is a keyword, I follow the variable name **fynally** in `TryStatement`.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services