[
https://issues.apache.org/jira/browse/DRILL-5284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15886817#comment-15886817
]
ASF GitHub Bot commented on DRILL-5284:
---------------------------------------
Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/761#discussion_r103335368
--- Diff: exec/vector/src/main/codegen/templates/VariableLengthVectors.java
---
@@ -238,6 +238,25 @@ public boolean copyFromSafe(int fromIndex, int
thisIndex, ${minor.class}Vector f
return true;
}
+ @Override
+ public int getAllocatedByteCount() {
+ return offsetVector.getAllocatedByteCount() +
super.getAllocatedByteCount();
--- End diff --
`super` is called only if the super class holds an actual buffer or nested
vector: not all do.
A sanity test is done in the sort: we compare the calculated memory
allocation with the actual memory delta when "taking ownership" of a batch. We
get an error if the numbers differ. That check ensures that the calcs in each
vector type are correct.
> 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)