Skip to content

Conversation

@Uzair5162
Copy link
Contributor

@Uzair5162 Uzair5162 commented Aug 12, 2024

This commit reverts a change in #127836 that changed the error returned when multiple stats are requested at once from a pgerror to a failed assertion. This change caused GenerateAndCheckRedactedExplainsForPII() to fail when generating SQL commands for certain explains on partial stats collections with multiple columns, which is unsupported and should be ignored like other pgerrors.

Fixes: #128848

Release note: None

@Uzair5162 Uzair5162 requested a review from michae2 August 12, 2024 22:36
@Uzair5162 Uzair5162 requested a review from a team as a code owner August 12, 2024 22:36
@blathers-crl
Copy link

blathers-crl bot commented Aug 12, 2024

It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@DrewKimball DrewKimball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: Just one nit.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @michae2 and @Uzair5162)


pkg/sql/distsql_plan_stats.go line 294 at r1 (raw file):

	// so we only support one requested stat at a time here.
	if len(reqStats) > 1 {
		return nil, pgerror.Newf(pgcode.FeatureNotSupported, "cannot process multiple partial statistics at once")

[nit] For a feature that isn't unimplemented yet, we usually use unimplemented.New or preferably unimplemented.NewWithIssue.

Copy link
Collaborator

@michae2 michae2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice quick fix! :lgtm: after Drew's nit.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 2 of 0 LGTMs obtained (waiting on @DrewKimball)


pkg/sql/distsql_plan_stats.go line 294 at r1 (raw file):

Previously, DrewKimball (Drew Kimball) wrote…

[nit] For a feature that isn't unimplemented yet, we usually use unimplemented.New or preferably unimplemented.NewWithIssue.

+1

@Uzair5162 Uzair5162 force-pushed the fix-flaky-TestExplainRedact-gh-128848 branch from 8588eb6 to 0a5ee95 Compare August 13, 2024 14:56
This commit reverts a change in cockroachdb#127836 that changed the error returned
when multiple stats are requested at once from a pgerror to a failed
assertion. This change caused `GenerateAndCheckRedactedExplainsForPII()`
to fail when generating SQL commands for certain explains on partial
stats collections with multiple columns, which is unsupported and should
be ignored like other pgerrors.

Closes: cockroachdb#128848

Release note: None
@Uzair5162 Uzair5162 force-pushed the fix-flaky-TestExplainRedact-gh-128848 branch from 0a5ee95 to daf39c2 Compare August 13, 2024 16:38
Copy link
Contributor Author

@Uzair5162 Uzair5162 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 (and 2 stale) (waiting on @DrewKimball and @michae2)


pkg/sql/distsql_plan_stats.go line 294 at r1 (raw file):

Previously, michae2 (Michael Erickson) wrote…

+1

Done.

@Uzair5162
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Aug 13, 2024

@craig craig bot merged commit ed0cad0 into cockroachdb:master Aug 13, 2024
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.

sql: TestExplainRedact failed

4 participants