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

workload: fix partition commands in tpcc import #40431

Merged
merged 1 commit into from
Sep 3, 2019

Conversation

solongordon
Copy link
Contributor

The commands for partitioning indexes in the TPCC import were erroring
out due to a syntax change introduced in #39332. I updated them to use
ALTER PARTITION ... OF INDEX rather than ALTER PARTITION ... OF TABLE.

Fixes #39005
Fixes #40360
Fixes #40416

Release note: None

The commands for partitioning indexes in the TPCC import were erroring
out due to a syntax change introduced in cockroachdb#39332. I updated them to use
`ALTER PARTITION ... OF INDEX` rather than `ALTER PARTITION ... OF
TABLE`.

Fixes cockroachdb#39005
Fixes cockroachdb#40360
Fixes cockroachdb#40416

Release note: None
@solongordon solongordon requested review from rohany and a team September 3, 2019 17:38
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@rohany
Copy link
Contributor

rohany commented Sep 3, 2019

Where is the code that uses this change?

@solongordon
Copy link
Contributor Author

It is used when loading data for the TPCC workload. See the partitionTables function:

func partitionTables(db *gosql.DB, cfg zoneConfig, wPart *partitioner) error {

Copy link
Contributor

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

@solongordon
Copy link
Contributor Author

bors r+

craig bot pushed a commit that referenced this pull request Sep 3, 2019
40248: opt: calculate number of rows processed when costing joins r=rytaft a=rytaft

This PR updates the costing of joins to take into account the number of
rows processed by the operator. This number may be larger than the
number of output rows if an additional filter is applied as part of the
ON condition that is not used to determine equality
columns for the join.

For example, consider the query
  `SELECT * FROM abc JOIN def ON a = e AND b = 3;`

Assuming there is no index on b, if a lookup join is used to execute this
query, the number of rows processed is actually the same as the query
  `SELECT * FROM abc JOIN def ON a = e;`

The difference is that the filter b=3 must also be applied to every row in
the first query. The coster now takes this into account when determining
the cost of joins.

Fixes #34810

Release note: None

40431: workload: fix partition commands in tpcc import r=solongordon a=solongordon

The commands for partitioning indexes in the TPCC import were erroring
out due to a syntax change introduced in #39332. I updated them to use
`ALTER PARTITION ... OF INDEX` rather than `ALTER PARTITION ... OF
TABLE`.

Fixes #39005
Fixes #40360
Fixes #40416

Release note: None

Co-authored-by: Rebecca Taft <[email protected]>
Co-authored-by: Solon Gordon <[email protected]>
@craig
Copy link
Contributor

craig bot commented Sep 3, 2019

Build succeeded

@craig craig bot merged commit f56a83d into cockroachdb:master Sep 3, 2019
@solongordon solongordon deleted the fix-tpcc-import branch September 9, 2019 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants