impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Taras Bobrovytsky (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-4787: Optimize APPX MEDIAN() memory usage
Date Tue, 14 Mar 2017 04:11:02 GMT
Taras Bobrovytsky has posted comments on this change.

Change subject: IMPALA-4787: Optimize APPX_MEDIAN() memory usage

Patch Set 15:

File be/src/exprs/

Line 979: // array and reallocating when the array is full. When this object is serialized,
> "When this object is serialized into an output buffer, the samples array is

Line 1042:   // memory containing this object and the samples array is freed. The serialized
> remove the implicit Delete() call and make that explicit at the call site. 
The problem is that we have to make some modifications to the object before serializing it.
For example, we set inline to true on line 1066. So Delete will not work any more.

One option is to set those variables, then copy, then set them to their original values. I
was considering doing that before, but I thought it might be confusing. What do you think
is the right thing to do here?

Line 1162:   // Size of the samples array.
> be specific by referencing the member explicitly.

Line 1180:   // Reallocates the samples array increasing it's capacity to "new_capacity" rounded
> fix punctuation.
Rephrased the comment.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I99adaad574d4fb0a3cf38c6cbad8b2a23df12968
Gerrit-PatchSet: 15
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Taras Bobrovytsky <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Jim Apple <>
Gerrit-Reviewer: Marcel Kornacker <>
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Mostafa Mokhtar <>
Gerrit-Reviewer: Taras Bobrovytsky <>
Gerrit-HasComments: Yes

View raw message