You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/03/21 02:17:00 UTC

[jira] [Commented] (DRILL-7656) Support injecting BufferManager into UDF

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

ASF GitHub Bot commented on DRILL-7656:
---------------------------------------

weijietong commented on pull request #2036: DRILL-7656: Support injecting BufferManager into UDF
URL: https://github.com/apache/drill/pull/2036
 
 
   # [DRILL-7656](https://issues.apache.org/jira/browse/DRILL-7656): Support injecting BufferManager into UDF
   
   ## Description
   This PR is to allow users to implement their UDF by using injected BufferManager to allocate they wanted number of  sized `DrillBuf`s. The reason why we need this which is not satisfied by the injected DrillBuf is described in the issue.
   
   ## Documentation
   When implement a UDF , you could assign @Inject annotation to an BufferManager type class member. 
   
   ## Testing
   have no testing
   
 
----------------------------------------------------------------
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


> Support injecting BufferManager into UDF
> ----------------------------------------
>
>                 Key: DRILL-7656
>                 URL: https://issues.apache.org/jira/browse/DRILL-7656
>             Project: Apache Drill
>          Issue Type: New Feature
>          Components: Execution - Codegen
>            Reporter: Weijie Tong
>            Assignee: Weijie Tong
>            Priority: Major
>             Fix For: 1.18.0
>
>
> Now  we can inject a re-allocation DrillBuf to UDF. It's applicable to most of  UDF usage cases. But there's some situation that does not work out. 
> If I want to implement an aggregation UDF , every group key has an aggregated bitmap which needs to be held  as a DrillBuf. Then the current injected DrillBuf will not solve this perfectly. Holding all the value bitmap memory into one DrillBuf will not only have the Integer.MAX_VALUE memory space limitation , but also not good performance as we need to always replace the old one , lots of memory copying.
> As BufferManager will finally be closed by the FragmentContext, it's safe to inject it to the UDF to be used by the users to allocate they wanted number of sized DrillBufs. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)