[
https://issues.apache.org/jira/browse/DRILL-5284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15876523#comment-15876523
]
Paul Rogers commented on DRILL-5284:
------------------------------------
The external sort operates in two phases: a sort phase (which may involve
spilling) and a merge phase. During the merge phase, spill files are opened,
read and merged. After the last record batch is returned, spill files remain
open. The {{close()}} operation closes all the files.
When a query includes multiple branches, or buffering operators above the sort,
the call to close may come quite a long time after the sort delivers the last
record batch.
Modify the sort to close all open spill files immediately after returning the
last record batch; don't wait for the call to close.
> Roll-up of final fixes for managed sort
> ---------------------------------------
>
> Key: DRILL-5284
> URL: https://issues.apache.org/jira/browse/DRILL-5284
> Project: Apache Drill
> Issue Type: Bug
> Affects Versions: 1.10.0
> Reporter: Paul Rogers
> Assignee: Paul Rogers
> Fix For: 1.10.0
>
>
> The managed external sort was introduced in DRILL-5080. Since that time,
> extensive testing has identified a number of minor fixes and improvements.
> Given the long PR cycles, it is not practical to spend a week or two to do a
> PR for each fix individually. This ticket represents a roll-up of a
> combination of a number of fixes. Small fixes are listed here, larger items
> appear as sub-tasks.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)