You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by "Weijie Tong (Jira)" <ji...@apache.org> on 2020/03/21 01:27:00 UTC

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

Weijie Tong created DRILL-7656:
----------------------------------

             Summary: 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
             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)