Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-7656

Support injecting BufferManager into UDF

    XMLWordPrintableJSON

    Details

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                weijie Weijie Tong
                Reporter:
                weijie Weijie Tong
                Reviewer:
                Arina Ielchiieva
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: