Matthew Jacobs has posted comments on this change.

Change subject: IMPALA-4120: Incorrect results with LEAD() analytic function
......................................................................


Patch Set 2:

(8 comments)

http://gerrit.cloudera.org:8080/#/c/4740/2/be/src/exec/analytic-eval-node.cc
File be/src/exec/analytic-eval-node.cc:

PS2, Line 390: string
string data

to be more specific


PS2, Line 399: copy result string for AnalyticEvalNode
Since this could show up in error messages, let's say something more friendly, 
e.g. "Failed to allocate memory for analytic function result."


PS2, Line 419: if (fn_scope_ != ROWS) {
Any reason not to return early (w/ OK now) if this == ROWS? It's nice to 
simplify the logic after. If we keep it, let's combine the if conditions in a 
single if stmt.


http://gerrit.cloudera.org:8080/#/c/4740/2/be/src/exec/analytic-eval-node.h
File be/src/exec/analytic-eval-node.h:

PS2, Line 138: Return error status on failure.
This can be more specific, right? Returns an error when out of memory.

And below too


http://gerrit.cloudera.org:8080/#/c/4740/2/be/src/exprs/agg-fn-evaluator.h
File be/src/exprs/agg-fn-evaluator.h:

PS2, Line 152: Note that the buffer for StringVal result is allocated from
             :   /// memory managed by Impala so it must be copied out by 
caller.
Do we need to call this out specifically here? It might just be better to add a 
few sentences in the class header about mem usage in general when using 
AggFnEvaluator.


PS2, Line 153: r.
... if it needs to be used beyond the lifetime of ... ?


PS2, Line 153: memory managed by Impala
this isn't specific, most memory in this process is managed by Impala :)


PS2, Line 237:  memory managed by Impala
this isn't specific, most memory in this process is managed by Impala :)

same for the statement above


-- 
To view, visit http://gerrit.cloudera.org:8080/4740
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I85bb1745232d8dd383a6047c86019c6378ab571f
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Michael Ho <k...@cloudera.com>
Gerrit-Reviewer: Matthew Jacobs <m...@cloudera.com>
Gerrit-Reviewer: Michael Ho <k...@cloudera.com>
Gerrit-HasComments: Yes

Reply via email to