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

roachtest: fix typo in tpchvec/perf #49554

Merged
merged 1 commit into from
May 28, 2020
Merged

Conversation

yuzefovich
Copy link
Member

TPCH queries have semicolon at the end, so when trying to do SELECT url FROM [EXPLAIN ANALYZE %s]; with query replacing the %s, we would have
a semicolon within square brackets which would produce a syntax error.
Fix this by reading both automatic boolean and url string and
outputting the latter.

Release note: None

@yuzefovich yuzefovich requested a review from asubiotto May 26, 2020 16:00
@cockroach-teamcity
Copy link
Member

This change is Reviewable

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.

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


pkg/cmd/roachtest/tpchvec.go, line 270 at r1 (raw file):

				for i := 0; i < tpchPerfTestNumRunsPerQuery; i++ {
					rows, err := conn.Query(fmt.Sprintf(
						"EXPLAIN ANALYZE %s;", tpch.QueriesByNumber[queryNum],

Does a double semi-colon matter? I would try this out by modifying it to always run EXPLAIN ANALYZE and running the roachtest locally to make sure it works so we avoid any other problems of this type.

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.

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


pkg/cmd/roachtest/tpchvec.go, line 270 at r1 (raw file):

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

Does a double semi-colon matter? I would try this out by modifying it to always run EXPLAIN ANALYZE and running the roachtest locally to make sure it works so we avoid any other problems of this type.

I tried it out in the cli, and an extra semicolon didn't matter, but I'll run the roachtest to confirm that.

TPCH queries have semicolon at the end, so when trying to do `SELECT url
FROM [EXPLAIN ANALYZE %s];` with query replacing the `%s`, we would have
a semicolon within square brackets which would produce a syntax error.
Fix this by reading both `automatic` boolean and `url` string and
outputting the latter.

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.

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


pkg/cmd/roachtest/tpchvec.go, line 270 at r1 (raw file):

Previously, yuzefovich wrote…

I tried it out in the cli, and an extra semicolon didn't matter, but I'll run the roachtest to confirm that.

The manual run actually showed that there was a problem with closing of rows - initially I had defer rows.Close() which would leave conn in "unfinished" state because I do not call rows.Next() until it returns false - i.e. until exhaustion. I modified the code a bit, and then everything worked as expected.

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 1 of 1 files at r2.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained

@yuzefovich
Copy link
Member Author

TFTR!

bors r+

@craig
Copy link
Contributor

craig bot commented May 28, 2020

Build failed (retrying...)

@craig
Copy link
Contributor

craig bot commented May 28, 2020

Build succeeded

@craig craig bot merged commit fed9db2 into cockroachdb:master May 28, 2020
@yuzefovich yuzefovich deleted the tpchvec branch May 28, 2020 03:53
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