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

bench: add a benchmark for update with assigment casts #88615

Merged
merged 1 commit into from
Sep 26, 2022

Conversation

yuzefovich
Copy link
Member

Informs: #88525.

Release note: None

@yuzefovich yuzefovich added backport-22.1.x 22.1 is EOL backport-22.2.x Flags PRs that need to be backported to 22.2. labels Sep 23, 2022
@yuzefovich yuzefovich requested review from mgartner and a team September 23, 2022 20:03
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@mgartner mgartner 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 @mgartner and @yuzefovich)


pkg/bench/bench_test.go line 602 at r1 (raw file):

		buf.Reset()
		buf.WriteString(`UPDATE bench.update SET v = v + `)
		buf.WriteString(`CASE WHEN k < 500 THEN 1.0 ELSE 2.0 END `)

nit: you don't need the CASE to force an assignment cast. This will do the trick: update t set v = (v + 1.0)::FLOAT where ...

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! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @mgartner)

@craig craig bot merged commit 089d9c0 into cockroachdb:master Sep 26, 2022
@craig
Copy link
Contributor

craig bot commented Sep 26, 2022

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-22.1.x 22.1 is EOL backport-22.2.x Flags PRs that need to be backported to 22.2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants