Github user weinan003 commented on a diff in the pull request:
https://github.com/apache/incubator-hawq/pull/1349#discussion_r177632783
--- Diff: contrib/vexecutor/vadt.c ---
@@ -39,10 +39,11 @@ size_t v##type##Size(vheader *vh) \
vheader* buildv##type(int n) \
{ \
vheader* result; \
- result = (vheader*) palloc0(offsetof(v##type,values) + n *
sizeof(type)); \
+ result = (vheader*) malloc(offsetof(v##type,values) + n *
sizeof(type)); \
+ memset(result,0,offsetof(v##type,values) + n * sizeof(type)); \
result->dim = n; \
result->elemtype = typeoid; \
- result->isnull = palloc(sizeof(bool) * n); \
+ result->isnull = malloc(sizeof(bool) * n); \
--- End diff --
It does make sense, I will attach another commit change it
---