[ 
https://issues.apache.org/jira/browse/DRILL-1054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14044240#comment-14044240
 ] 

Jacques Nadeau commented on DRILL-1054:
---------------------------------------

I don't think we should add a block to all functions.  Can you update so we 
only add in the cases where we need it.  We've already gotten crazy about block 
creation.  I think we already surround functions by a block.  Maybe we could 
just reuse that block?

> Handle "return" statement within function templates
> ---------------------------------------------------
>
>                 Key: DRILL-1054
>                 URL: https://issues.apache.org/jira/browse/DRILL-1054
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Mehant Baid
>            Assignee: Jacques Nadeau
>            Priority: Minor
>         Attachments: DRILL-1054.patch
>
>
> Currently if the function template contains a return statement, we would 
> simply use it as is in the runtime generated code. Since we can possibly 
> combine multiply function templates' code into one runtime generated class we 
> might hit compilation errors of the form "Unreachable code" due to a "return" 
> in the middle of the function.
> This patch will replace the return with suitable break statements before we 
> use it in the runtime generated code.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to