Github user ppadma commented on the issue:
https://github.com/apache/drill/pull/1125
@paul-rogers Updated the PR with latest changes. I have decided not to use
vector initializer for allocation as it is subject to alias issues like you
mentioned. Instead, I added allocate vector method to columnSize in batch
sizer, which will use internal sizing information it has to allocate memory
(including all it's children) for a particular record count.
Refactored the batch sizer code, added unit tests for verifying sizing and
allocation for different vector types.
Please take a look when you get a chance and let me know what you think.
---