Todd Lipcon has submitted this change and it was merged.
Change subject: Inlined dispatch for predicate evaluation
Inlined dispatch for predicate evaluation
In order to evaluate a predicate, the correct comparator must first be
determined. Batched evaluation, which calls
ColumnPredicate::Evaluate(), will make a function call to the correct
comparator for every row. The evaluation itself gets split into
batches, but each row in the batch still makes the function call,
which slows performance. To remediate this, this evaluation has been
templatized so there is only a single function call per batch.
Additionally, when decoder-level evaluation is enabled, rather than
occuring in batches, dispatch occurs for each cell at EvaluateCell,
which leads to poorer performance. To remediate this, the dispatch
has been templatized in hopes that the dispatching and branching are
This figure shows the performance of plain encoding for decoder-level
evaluation without this templating adjustment. The query selects a one
tenth the values out of a plain-encoded column containing 10M strings.
EvaluateCell (the Pushdown bar) in this implementation gets compiled
to a dispatched function call per row, which slows it down. Evaluate
(the Normal Eval bar) also dispatches once per row.
Compare the above with the plot below, which is the result of the same
query, but with inlined dispatch. The comparator is known statically,
so calls to EvaluateCell will be inlined. Additionally, Evaluate only
dispatches once per batch.
Tested-by: Kudu Jenkins
Reviewed-by: Todd Lipcon <t...@apache.org>
4 files changed, 57 insertions(+), 41 deletions(-)
Todd Lipcon: Looks good to me, approved
Kudu Jenkins: Verified
To view, visit http://gerrit.cloudera.org:8080/4164
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Owner: Andrew Wong <andrew.w...@cloudera.com>
Gerrit-Reviewer: Alexey Serbin <aser...@cloudera.com>
Gerrit-Reviewer: Andrew Wong
Gerrit-Reviewer: Dan Burkert <d...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>