Skip to content
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: cleanup handling of EXPLAIN in the new factory #52108

Merged
merged 2 commits into from
Aug 4, 2020

Conversation

yuzefovich
Copy link
Member

sql: cleanup ordinality code a bit

Release note: None

sql: cleanup handling of EXPLAIN in the new factory

Previously, several EXPLAIN variants were mishandled in the new factory:
instead of being wrapped as other planNodes are they were kept separate
which resulted in a "mixed"-representation plan. This is now fixed by
properly wrapping them.

Release note: None

@yuzefovich yuzefovich requested review from jordanlewis and a team July 30, 2020 03:37
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Previously, several EXPLAIN variants were mishandled in the new factory:
instead of being wrapped as other planNodes are they were kept separate
which resulted in a "mixed"-representation plan. This is now fixed by
properly wrapping them.

Additionally, this commit removes "partial support" that we had for
EXPLAIN (PLAN) - the new factory cannot currently implement it, so in
such cases we will be falling back to the old factory.

Release note: None
@yuzefovich yuzefovich requested review from asubiotto and removed request for jordanlewis August 3, 2020 18:31
Copy link
Contributor

@asubiotto asubiotto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 3 of 3 files at r1, 11 of 11 files at r2.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @yuzefovich)


pkg/sql/distsql_physical_planner.go, line 449 at r1 (raw file):

		// WITH ORDINALITY never gets distributed so that the gateway node can
		// always number each row in order.
		return cannotDistribute, nil

Does this fix a bug? If so, you should call that out in the commit message.

Copy link
Member Author

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TFTR!

bors r+

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @asubiotto)


pkg/sql/distsql_physical_planner.go, line 449 at r1 (raw file):

Previously, asubiotto (Alfonso Subiotto Marqués) wrote…

Does this fix a bug? If so, you should call that out in the commit message.

No, it doesn't because this case was handled by default case below. I made this change mostly for cosmetics - I think default is a catch-all for planNodes that don't have an equivalent processor, but ordinality node does have an equivalent and we choose (or we have to) not distribute it, so IMO it's nice to have an explicit case here that calls out that we don't distribute ordinality stage.

@craig
Copy link
Contributor

craig bot commented Aug 4, 2020

Build succeeded:

@craig craig bot merged commit 5102c97 into cockroachdb:master Aug 4, 2020
@yuzefovich yuzefovich deleted the distsql-cleanup branch August 4, 2020 15:12
craig bot pushed a commit that referenced this pull request Aug 4, 2020
51305: geo,geoindex: use bounding box for geography coverings that are bad r=sumeerbhola a=sumeerbhola

This change uses a covererInterface implementation for geography
that notices when a covering is using top-level cells of all faces
and in that case uses the bounding box to compute the covering.

Also changed the bounding box calculation for geography shapes to
use only the points and not first construct s2.Regions. The latter
causes marginally bad shapes to continue to have bad coverings since
the bounding box also covers the whole earth.

Release note: None

51882: roachpb: panic when comparing a Lease to a non-lease r=andreimatei a=andreimatei

Release note: None

52146: sql: remove local execution of projectSetNode and implement ConstructProjectSet in the new factory r=yuzefovich a=yuzefovich

Depends on #52108.

**sql: remove local execution of projectSetNode**

We have project set processor which is always planned for
`projectSetNode`, so this commit removes the dead code of its local
execution. Additionally, it removes some unused fields and cleans up
cancellation check of the processor.

Release note: None

**sql: implement ConstructProjectSet in the new factory**

Addresses: #47473.

Release note: None

52320: kvserver: enable merges in kvnemesis r=aayushshah15 a=aayushshah15

We had merges disabled because of the bugs tracked in #44878, but those have
since been fixed by #46085 and #50265.

Release note: None

Co-authored-by: sumeerbhola <sumeer@cockroachlabs.com>
Co-authored-by: Andrei Matei <andrei@cockroachlabs.com>
Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
Co-authored-by: Aayush Shah <aayush.shah15@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants