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

logictest: fix comparison logic #55876

Merged
merged 1 commit into from
Oct 23, 2020

Conversation

otan
Copy link
Contributor

@otan otan commented Oct 22, 2020

9d2c054fd3e9e8c6a7d73f4e464ebd32ee82b8a2 introduced a bug in the
commit logic where it would only check logic test errors for the first
line, since it only compares the first column of results. This is now
fixed to compare every row.

Release note: None

@otan otan requested a review from yuzefovich October 22, 2020 22:02
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@otan otan force-pushed the logictest_breakage branch 2 times, most recently from 3e5eb0c to 81498c3 Compare October 22, 2020 22:06
Copy link
Member

@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.

:lgtm:

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


pkg/sql/logictest/logic.go, line 2741 at r1 (raw file):

				if colT == 'F' {
					var err error
					resultMatches, err = floatsMatch(expected, actual)

Your first version was correct - we now don't check whether resultMatches is true in this case. Ok, nvm.

Copy link
Member

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


pkg/sql/logictest/logic.go, line 2741 at r1 (raw file):

Previously, yuzefovich wrote…

Your first version was correct - we now don't check whether resultMatches is true in this case. Ok, nvm.

Oh wait, we still don't check resultMatches here.

@otan
Copy link
Contributor Author

otan commented Oct 22, 2020


pkg/sql/logictest/logic.go, line 2741 at r1 (raw file):

Previously, yuzefovich wrote…

Oh wait, we still don't check resultMatches here.

ah i tried to be too smart

`9d2c054fd3e9e8c6a7d73f4e464ebd32ee82b8a2` introduced a bug in the
commit logic where it would only check logic test errors for the first
line, since it only compares the first column of results. This is now
fixed to compare every row.

Release note: None
Copy link
Member

@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.

Reviewed 1 of 1 files at r3.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale)

@otan
Copy link
Contributor Author

otan commented Oct 22, 2020

hurray nothing broke!

bors r=yuzefovich

@craig
Copy link
Contributor

craig bot commented Oct 23, 2020

Build succeeded:

@craig craig bot merged commit 4702643 into cockroachdb:master Oct 23, 2020
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