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: add final projection during physical plan's finalization #50973

Merged
merged 1 commit into from
Jul 6, 2020

Conversation

yuzefovich
Copy link
Member

This commit updates the contract between DistSQLReceiver and
FinalizePlan method so that the latter adds a projection which allows
the DistSQL receiver to get the rows with the desired schema. This
shouldn't have any effect on the performance, but it seems like a
cleaner approach.

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@yuzefovich yuzefovich force-pushed the finalize-plan branch 3 times, most recently from c105ab5 to 836b50b Compare July 4, 2020 03:31
@yuzefovich yuzefovich requested a review from a team as a code owner July 4, 2020 03:31
Copy link
Member

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

:lgtm:

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


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

	// Add a final projection so that DistSQLReceiver gets the rows of the
	// desired schema. Note that we don't need to update PlanToStreamColMap
	// since it is no longer necessary.

[nit] maybe set PlanToStreamColMap to nil just in case

@yuzefovich yuzefovich force-pushed the finalize-plan branch 2 times, most recently from 05dbb26 to 476380a Compare July 6, 2020 19:14
@yuzefovich yuzefovich requested review from a team and pbardea and removed request for a team July 6, 2020 19:14
This commit updates the contract between `DistSQLReceiver` and
`FinalizePlan` method so that the latter adds a projection which allows
the DistSQL receiver to get the rows with the desired schema. This
shouldn't have any effect on the performance, but it seems like a
cleaner approach.

Release note: None
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.

I had to make several changes to fix a few things, so I'd appreciate another quick look before merging this.

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


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

Previously, RaduBerinde wrote…

[nit] maybe set PlanToStreamColMap to nil just in case

Done.

Copy link
Member

@RaduBerinde RaduBerinde left a comment

Choose a reason for hiding this comment

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

:lgtm:

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

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 @pbardea)

@craig
Copy link
Contributor

craig bot commented Jul 6, 2020

Build succeeded

@craig craig bot merged commit d7761ab into cockroachdb:master Jul 6, 2020
@yuzefovich yuzefovich deleted the finalize-plan branch July 6, 2020 23:25
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