-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
exec: reset internal unsafeBatch in orderedAggregator #40668
Conversation
Modified the variable size interface so that the merge joiner can also be tested and the tests are failing. Will investigate. |
Not too sure what's up. Pushed up the changes to test the mergejoiner. @yuzefovich would you mind taking a quick look to see if you see anything obvious? |
Nice find! This was a bug with the merge joiner. Here is the diff that fixes it:
The incorrect assumption was that we would always get into |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @asubiotto)
pkg/sql/exec/utils_test.go, line 81 at r1 (raw file):
// initialized with variable output size batches. This allows runTests to // increase test coverage of these operators. type variableBatchSizeInitializer interface {
[nit]: also would call this variableOutputBatchSizeInitializer
.
I added a similar mjTestInitializer
interface in mergejoiner_test.go
, I think we should remove that in favor of the one you're introducing.
pkg/sql/exec/utils_test.go, line 82 at r1 (raw file):
// increase test coverage of these operators. type variableBatchSizeInitializer interface { initWithBatchSize(outputSize uint16)
[nit]: I'd call this initWithOutputBatchSize
and rename the argument to just size
.
Here is a better fix:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Applied the mergejoiner patch
Reviewable status: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @yuzefovich)
pkg/sql/exec/utils_test.go, line 81 at r1 (raw file):
Previously, yuzefovich wrote…
[nit]: also would call this
variableOutputBatchSizeInitializer
.I added a similar
mjTestInitializer
interface inmergejoiner_test.go
, I think we should remove that in favor of the one you're introducing.
Done.
pkg/sql/exec/utils_test.go, line 82 at r1 (raw file):
Previously, yuzefovich wrote…
[nit]: I'd call this
initWithOutputBatchSize
and rename the argument to justsize
.
Done.
Not doing so could lead to correctness results. This was not caught by tests, so runTests has been extended to check for operators that can be initialized with a variable output size. This increases verifySelAndNullResets's test coverage, since it doesn't do anything if only a single batch is output, which is the case for most unit tests. Release note: None Release justification: This commit fixes correctness bugs and increases test coverage (Category 2).
bors r=yuzefovich |
bors r- |
bors r=yuzefovich |
Build failed |
Release justification missing from PR description bors r=yuzefovich |
40668: exec: reset internal unsafeBatch in orderedAggregator r=yuzefovich a=asubiotto Not doing so could lead to correctness results. This was not caught by tests, so runTests has been extended to check for operators that can be initialized with a variable output size. This increases verifySelAndNullResets's test coverage, since it doesn't do anything if only a single batch is output, which is the case for most unit tests. Release note: None Release justification: This commit fixes correctness bugs and increases test coverage (Category 2). Fixes #40641 Co-authored-by: Alfonso Subiotto Marqués <alfonso@cockroachlabs.com>
Build succeeded |
Not doing so could lead to correctness results. This was not caught by
tests, so runTests has been extended to check for operators that can be
initialized with a variable output size. This increases
verifySelAndNullResets's test coverage, since it doesn't do anything if
only a single batch is output, which is the case for most unit tests.
Release note: None
Release justification: This commit fixes correctness bugs and increases
test coverage (Category 2).
Fixes #40641