-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
sql: add sort and virtual scan support in the new factory #50909
Conversation
b6ba4c9
to
2dbfc86
Compare
b33afd8
to
719c205
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1, 4 of 4 files at r2.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @yuzefovich)
pkg/sql/distsql_spec_exec_factory.go, line 69 at r2 (raw file):
evalCtx := e.planner.ExtendedEvalContext() e.planContexts.distPlanCtx = e.dsp.NewPlanningCtx(evalCtx.Context, evalCtx, e.planner.txn, distribute) e.planContexts.distPlanCtx.planner = e.planner
Why not have NewPlanningCtx
set the planner
field?
636dfa6
to
2d9fb35
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @asubiotto)
pkg/sql/distsql_spec_exec_factory.go, line 69 at r2 (raw file):
Previously, asubiotto (Alfonso Subiotto Marqués) wrote…
Why not have
NewPlanningCtx
set theplanner
field?
Done.
Nice, this seems like an improvement to me in general. |
a6693e2
to
7614100
Compare
Oh man, I can't figure out why the build is failing :/ I'll put off this PR for now. |
Found a panic through the build's logTestLogic artifacts:
|
Oh, thanks. I'm having really hard time navigating the logs now. This panic seems related to a test logic failure on master #51179 (comment). |
7614100
to
1bc88c1
Compare
Release note: None
1bc88c1
to
3e0149c
Compare
The support is added by sharing the same code with the old factory that construct `delayedNode` with the rest of necessary methods already being implemented in the new factory. That delayedNode is wrapped into the physical plan via a callback. Note that with the new factory it is possible to have a distributed plan that contains an execinfra.LocalProcessor. This required to make a change that distsql.LocalState, regardless of the plan distribution, has always LocalProcs set when setting up a flow on the gateway. Release note: None
3e0149c
to
3ee7694
Compare
Ok, the build is green (I needed to fix a thing with scrub checks, and another failure is unrelated problem present on master), so I'm going to go ahead and merge this. TFTR! bors r+ |
Build succeeded |
sql: implement ConstructSort in the new factory
Release note: None
sql: add support of virtual scans in the new factory
The support is added by sharing the same code with the old factory that
construct
delayedNode
with the rest of necessary methods already beingimplemented in the new factory. That delayedNode is wrapped into the
physical plan via a callback.
Note that with the new factory it is possible to have a distributed plan
that contains an execinfra.LocalProcessor. This required to make
a change that distsql.LocalState, regardless of the plan distribution,
has always LocalProcs set when setting up a flow on the gateway.
Addresses: #47473.
Release note: None