Tim Armstrong has posted comments on this change. Change subject: IMPALA-3360: Codegen inserting into runtime filters ......................................................................
Patch Set 1: (4 comments) Nice to see this getting fixed. http://gerrit.cloudera.org:8080/#/c/8029/1/be/src/exec/filter-context.h 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(). http://gerrit.cloudera.org:8080/#/c/8029/1/be/src/exec/partitioned-hash-join-builder.cc File be/src/exec/partitioned-hash-join-builder.cc: 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) { insert_runtime_filters_fn->addFnAttr(llvm::Attribute::NoInline); } 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. http://gerrit.cloudera.org:8080/#/c/8029/1/be/src/util/bloom-filter-ir.cc File be/src/util/bloom-filter-ir.cc: 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 http://gerrit.cloudera.org:8080/8029 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I79cf23ad92dadaab996a50a2ca07ef9ebe8639bb Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Thomas Tauber-Marshall <[email protected]> Gerrit-Reviewer: Matthew Jacobs <[email protected]> Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-HasComments: Yes
