DRILL-5443: Rollup of external sort fixes
- DRILL-5758: the “record batch sizer” did not handle repeated columns correctly.
- Enabled managed sort by default
- Fix check style warning
- Fix for DRILL-5670
Estimation for size of spill batch read from disk was off. For some
reason, Drill needs an amount of memory 2x the data size. The previous
estimate was 1.5x. That error, accumulated over 47 columns, was enough
to cause an OOM.
- Code cleanup discovered during the investigation.
- Exception if reAlloc tries to double a zero-size vector
- DRILL-5804: Fixes issues with zero-length vector allocations.
- Better estimates array cardinality when it is fractional.
- Uses fractional cardinality to allocate new arrays.
- Prevents an infinite loop on reAlloc if the array starts empty.
- Fixed unit test issue
- Change batch size variables from int to long
closes #932