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-4883: Implement Codegen for Union
Date Thu, 30 Mar 2017 01:59:00 GMT
Taras Bobrovytsky has posted comments on this change.

Change subject: IMPALA-4883: Implement Codegen for Union

Patch Set 2:

File be/src/exec/

PS2, Line 23: void UnionNode::MaterializeExprsInner(const vector<ExprContext*>&
            :     TupleRow* row, Tuple* dst_tuple, MemPool* pool) {
> This seems like a thin-wrapper around Tuple::MaterializeExprs(). It seems u
Changed it so that this function does more work (changed function name too).
File be/src/exec/

Line 26: 
> unnecessary new line

Line 110:     if (!codegen_status.ok()) continue;
> We shouldn't drop this status - at the least we should display it in the pr
Done, aborting codegen in case of failure.

Line 129:     runtime_profile()->AddCodegenMsg(codegen_status.ok(), codegen_status);
> How does this show up in the profile? If we're going to show the results of
Changed it so that only 1 message is displayed. If there is a failure, we indicate which child
node caused it.

Line 184:   if (UNLIKELY(codegend_union_materialize_exprs_fns_.size() == 0 ||
> Just to confirm my suspicion, it would be good to run "perf top" while your
-Initialize all entries to nullptr as suggested.
-Pushed the loop into into codegened code and got a few seconds improvement (25 sec vs 22)

I think the new implementation is equivalent to what you suggested (except we use a while
loop instead of a for loop). Do you see any other ways to optimize the code further?

PS2, Line 190: DCHECK(
Code was reorganized and this was removed.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib4107d27582ff5416172810364a6e76d3d93c439
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Taras Bobrovytsky <>
Gerrit-Reviewer: Michael Ho <>
Gerrit-Reviewer: Taras Bobrovytsky <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-HasComments: Yes

View raw message