Skip to content

rowexec: remove unnecessary joiner member#67326

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
andreimatei:small.joiner-refactor-container-idx
Jul 14, 2021
Merged

rowexec: remove unnecessary joiner member#67326
craig[bot] merged 1 commit intocockroachdb:masterfrom
andreimatei:small.joiner-refactor-container-idx

Conversation

@andreimatei
Copy link
Copy Markdown
Contributor

The joiner had a field tracking a confusing lookup row index. Besides
being confusing, this member obscured the fact that it was equal to the
ordinal returned by inserting rows into a disk container - and thus that
the respective ordinal is used.

Release note: None

@andreimatei andreimatei requested review from nvb, rytaft and sumeerbhola July 7, 2021 20:05
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Collaborator

@rytaft rytaft 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 1 of 1 files at r1.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @andreimatei, @nvanbenschoten, and @sumeerbhola)


pkg/sql/rowexec/joinreader_strategies.go, line 429 at r1 (raw file):

		}
		var err error
		containerIdx, err = s.lookedUpRows.AddRow(ctx, row)

nit: why not call this lookedUpRowIdx?

@sumeerbhola
Copy link
Copy Markdown
Collaborator

Thanks for doing this. I should have removed this when switching joinReader to use DiskBackedNumberedRowContainer (it used to use DiskBackedIndexedRowContainer which does not return the ordinal, which was why this field originally existed).

Copy link
Copy Markdown
Collaborator

@sumeerbhola sumeerbhola 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! 2 of 0 LGTMs obtained (waiting on @andreimatei and @nvanbenschoten)

The joiner had a field tracking a confusing lookup row index. Besides
being confusing, this member obscured the fact that it was equal to the
ordinal returned by inserting rows into a disk container - and thus that
the respective ordinal is used.

Release note: None
@andreimatei andreimatei force-pushed the small.joiner-refactor-container-idx branch from 64700a7 to 748c79e Compare July 13, 2021 21:25
Copy link
Copy Markdown
Contributor Author

@andreimatei andreimatei left a comment

Choose a reason for hiding this comment

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

bors r+

Reviewable status: :shipit: complete! 2 of 0 LGTMs obtained (waiting on @nvanbenschoten and @rytaft)


pkg/sql/rowexec/joinreader_strategies.go, line 429 at r1 (raw file):

Previously, rytaft (Rebecca Taft) wrote…

nit: why not call this lookedUpRowIdx?

I went back and forth, but ultimately I left it; I think it's good here to emphasize strongly the link to the cointainer. Since this method deals with a single thing - a looked-up row - emphasizing that the id identifies it is less interesting.

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jul 14, 2021

Build failed (retrying...):

@craig craig bot merged commit 5a0b11e into cockroachdb:master Jul 14, 2021
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jul 14, 2021

Build succeeded:

@andreimatei andreimatei deleted the small.joiner-refactor-container-idx branch January 20, 2022 16:26
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.

4 participants