sql,colexec: minor cleanup of scan-related things#57267
sql,colexec: minor cleanup of scan-related things#57267craig[bot] merged 1 commit intocockroachdb:masterfrom
Conversation
pkg/sql/distsql_physical_planner.go
Outdated
| offset := len(desc.Columns) | ||
| for i, col := range desc.MutationColumns() { | ||
| if col.ID == colID { | ||
| for i := range desc.MutationColumns() { |
There was a problem hiding this comment.
extract desc.MutationColumns() outside of the loop, I don't think the compiler can necessarily eliminate the common subexpression here.
pkg/sql/distsql_physical_planner.go
Outdated
| for _, col := range info.desc.MutationColumns() { | ||
| typs = append(typs, col.Type) | ||
| for i := range info.desc.MutationColumns() { | ||
| typs = append(typs, info.desc.MutationColumns()[i].Type) |
pkg/sql/distsql_physical_planner.go
Outdated
| for _, c := range info.desc.MutationColumns() { | ||
| descColumnIDs.Set(colID, int(c.ID)) | ||
| for i := range info.desc.MutationColumns() { | ||
| descColumnIDs.Set(colID, int(info.desc.MutationColumns()[i].ID)) |
This commit removes multiple arguments in favor of using the spec when initializing the cFetcher as well as refactors several loops in order to avoid making copies of descriptors during table reader planning. Additionally, it moves a map from scanNode next to the map's only user (stats job) and removes the map from the scanNode itself as well as removes some of the unused arguments. Release note: None
yuzefovich
left a comment
There was a problem hiding this comment.
TFTR!
bors r+
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @jordanlewis)
pkg/sql/distsql_physical_planner.go, line 1016 at r1 (raw file):
Previously, jordanlewis (Jordan Lewis) wrote…
extract
desc.MutationColumns()outside of the loop, I don't think the compiler can necessarily eliminate the common subexpression here.
Done.
pkg/sql/distsql_physical_planner.go, line 1288 at r1 (raw file):
Previously, jordanlewis (Jordan Lewis) wrote…
ditto above
Done.
pkg/sql/distsql_physical_planner.go, line 1311 at r1 (raw file):
Previously, jordanlewis (Jordan Lewis) wrote…
ditto above
Done.
57267: sql,colexec: minor cleanup of scan-related things r=yuzefovich a=yuzefovich This commit removes multiple arguments in favor of using the spec when initializing the cFetcher as well as refactors several loops in order to avoid making copies of descriptors during table reader planning. Additionally, it moves a map from scanNode next to the map's only user (stats job) and removes the map from the scanNode itself as well as removes some of the unused arguments. Release note: None Co-authored-by: Yahor Yuzefovich <yahor@cockroachlabs.com>
|
Build failed: |
|
Mysterious test failure with what-looks-like empty logs. bors r+ |
|
Build succeeded: |
This commit removes multiple arguments in favor of using the spec when
initializing the cFetcher as well as refactors several loops in order to
avoid making copies of descriptors during table reader planning.
Additionally, it moves a map from scanNode next to the map's only user
(stats job) and removes the map from the scanNode itself as well as
removes some of the unused arguments.
Release note: None