impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Armstrong (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-3360: Codegen inserting into runtime filters
Date Wed, 13 Sep 2017 23:15:20 GMT
Tim Armstrong has posted comments on this change.

Change subject: IMPALA-3360: Codegen inserting into runtime filters

Patch Set 1:


Nice to see this getting fixed.
File be/src/exec/filter-context.h:

Line 124:   static Status CodegenInsert(LlvmCodeGen* codegen, ScalarExpr* filter_expr,
This is a bit tricky because it doesn't actually do exactly the same thing as Insert() - it
doesn't check if the filter is NULL. That would be worth documenting, but I think the null
check is actually necessary so the resolution is probably just to make it do the same thing
as Insert().
File be/src/exec/

Line 953:   if (num_filters == 0) {
Nit: it looks like the two branches are identical except for adding the NoInline. Might be
clearer just to write:

  if (num_filters > 0) {

Line 958:       if (filter_ctxs_[i].local_bloom_filter != NULL) {
Going forward, we want to avoid have this dependence between the codegen code and fragment
instance-local state: see IMPALA-4080 - so that the same codegen'd code can be shared between
instances of the same plan node. I.e. this should be a runtime branch.
File be/src/util/

Line 32:   if (CpuInfo::IsSupported(CpuInfo::AVX2)) {
It would be nice to keep this in header file to avoid regressing the non-codegen'd path (although
that likely won't be a big deal).

It would also be nice to avoid this AVX2 branch. Maybe we could just have 3 versions - the
original inlined one in the header and then two IR ones here for the AVX and non-AVX2 cases.

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I79cf23ad92dadaab996a50a2ca07ef9ebe8639bb
Gerrit-PatchSet: 1
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Thomas Tauber-Marshall <>
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Michael Ho <>
Gerrit-Reviewer: Tim Armstrong <>
Gerrit-HasComments: Yes

View raw message