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

exec: Fix bug in test case generation causing NULLs not to be reset between batches #38612

Merged
merged 1 commit into from
Jul 2, 2019

Conversation

rohany
Copy link
Contributor

@rohany rohany commented Jul 2, 2019

There was a small bug in the exec test generator causing some
nulls in batches to not be reset, due to iterating over the
columns of the input tuple type rather than over all columns
in the batch.

Release note: None

@rohany rohany requested review from solongordon and a team July 2, 2019 17:43
@cockroach-teamcity
Copy link
Member

This change is Reviewable

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.

Nice find, thanks! :lgtm:

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


pkg/sql/exec/utils_test.go, line 269 at r1 (raw file):

	}

	// Reset nulls for all columns in this batch

[nit]: missing period.


pkg/sql/exec/utils_test.go, line 349 at r1 (raw file):

	}

	// Reset nulls for all columns in this batch

ditto

There was a small bug in the exec test generator causing some
nulls in batches to not be reset, due to iterating over the
columns of the input tuple type rather than over all columns
in the batch.

Release note: None
@rohany
Copy link
Contributor Author

rohany commented Jul 2, 2019

TFTR! Fixed that up.

@rohany
Copy link
Contributor Author

rohany commented Jul 2, 2019

bors r+

craig bot pushed a commit that referenced this pull request Jul 2, 2019
38612: exec: Fix bug in test case generation causing NULLs not to be reset between batches r=rohany a=rohany

There was a small bug in the exec test generator causing some
nulls in batches to not be reset, due to iterating over the
columns of the input tuple type rather than over all columns
in the batch.

Release note: None

Co-authored-by: Rohan Yadav <rohany@alumni.cmu.edu>
Copy link
Contributor

@solongordon solongordon left a comment

Choose a reason for hiding this comment

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

I wonder if it would be better to make a new batch every time Next() is called. That way we don't need to worry about the batch being mutated by downstream operators, e.g. setting nulls or adding more columns.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @rohany, @solongordon, and @yuzefovich)

@craig
Copy link
Contributor

craig bot commented Jul 2, 2019

Build succeeded

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.

4 participants