-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
distsql: implement evaluator (processor core type) #9916
Conversation
Review status: 0 of 8 files reviewed at latest revision, 9 unresolved discussions. sql/distsql/evaluator.go, line 56 at r1 (raw file):
[nit] comments are usually wrapped at 80 cols sql/distsql/evaluator.go, line 74 at r1 (raw file):
should open a tracing span, see e.g. sorter.Run sql/distsql/evaluator.go, line 101 at r1 (raw file):
[nit] more straightforward if we just do this directly inside Run, we're duplicating the end condition checks just to separate out a couple of lines sql/distsql/evaluator.go, line 111 at r1 (raw file):
s/extract/eval sql/distsql/evaluator.go, line 112 at r1 (raw file):
we should avoid allocating this for every row. we could allocate it once and reuse it. Might be easier to just do everything directly inside sql/distsql/expr.go, line 153 at r1 (raw file):
s/extract/eval sql/distsql/expr.go, line 156 at r1 (raw file):
[nit] wrap at 80 sql/distsql/expr.go, line 166 at r1 (raw file):
This is not something this processor (or any part of the physical plan) should be worried about. It's up to the code that will build logica and physical plans to extract expressions from aggregate and configure the processors with the correct expressions. sql/sqlbase/encoded_datum.go, line 240 at r1 (raw file):
We should use a Comments from Reviewable |
2853881
to
20d2465
Compare
Review status: 0 of 8 files reviewed at latest revision, 9 unresolved discussions, some commit checks failed. sql/distsql/evaluator.go, line 56 at r1 (raw file):
|
Review status: 0 of 8 files reviewed at latest revision, 2 unresolved discussions, some commit checks failed. sql/distsql/evaluator.go, line 81 at r2 (raw file):
"evaluator" sql/sqlbase/encoded_datum.go, line 230 at r2 (raw file):
Include the type in the error. Comments from Reviewable |
46e4e18
to
fd1ec41
Compare
Implementation of the `Evaluator` processor core type, a fully programmable no-grouping aggregator that runs a 'program' on each individual row. The 'program' is a set of expressions evaluated in order, the results of evaluating each of these expressions on the input row form the output. Part of cockroachdb#7587.
fd1ec41
to
6deb605
Compare
TFTR! pulling this in now. Review status: 0 of 8 files reviewed at latest revision, 2 unresolved discussions, some commit checks pending. pkg/sql/distsql/evaluator.go, line 81 at r2 (raw file):
|
Implementation of the
Evaluator
processor core type, a fullyprogrammable no-grouping aggregator that runs a 'program' on each
individual row. The 'program' is a set of expressions evaluated in
order, the results of evaluating each of these expressions on the input
row form the output.
Part of #7587, pulled out of the original work in #9793 (see this and this).
CC @RaduBerinde @andreimatei
This change is