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

coldata: bugfix to coldata.Copy with NULL and SelOnDest #40620

Merged
merged 1 commit into from
Sep 10, 2019

Conversation

jordanlewis
Copy link
Member

@jordanlewis jordanlewis commented Sep 10, 2019

Previously, Copy always wiped all of the destination NULLs regardless of
SelOnDest, which if set indiciates that only the selection vector tuples
will be written to on the destination side. Now, when SelOnDest is
true, we don't erroneously overwrite non-selected nulls.

Release note: None

@jordanlewis jordanlewis requested review from yuzefovich and a team September 10, 2019 04:59
@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.

:lgtm: Thanks!

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


pkg/col/coldata/vec_test.go, line 366 at r1 (raw file):

	// Set up the destination vector.
	dst := NewMemColumn(typ, BatchSize)

[nit]: I'd mention that the vector is with all nulls except for a single non-null at the index 0.


pkg/col/coldata/vec_test.go, line 375 at r1 (raw file):

	// Set up the source vector with one null.
	src := NewMemColumn(typ, BatchSize)

[nit]: s/one null/two nulls/ above.


pkg/col/coldata/vec_test.go, line 391 at r1 (raw file):

			Src:         src,
			SrcStartIdx: 1,
			SrcEndIdx:   2,

Comment below indicates that you might have intended to use SrcEndIdx: 3.


pkg/col/coldata/vec_tmpl.go, line 131 at r1 (raw file):

	// }

	switch args.ColType {

[nit]: s/indicate/indicates/ above.

Previously, Copy always wiped all of the destination NULLs regardless of
SelOnDest, which if set indiciates that only the selection vector tuples
will be written to on the destinatiion side. Now, when SelOnDest is
true, we don't erroneously overwrite non-selected nulls.

Release note: None
@jordanlewis
Copy link
Member Author

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 10, 2019

Canceled (will resume)

@craig
Copy link
Contributor

craig bot commented Sep 10, 2019

Build failed

@jordanlewis
Copy link
Member Author

[14:44:03][Run Benchmarks] tee: artifacts/bench.log: No space left on device

bors r+

craig bot pushed a commit that referenced this pull request Sep 10, 2019
40620: coldata: bugfix to coldata.Copy with NULL and SelOnDest r=jordanlewis a=jordanlewis

Previously, Copy always wiped all of the destination NULLs regardless of
SelOnDest, which if set indiciates that only the selection vector tuples
will be written to on the destination side. Now, when SelOnDest is
true, we don't erroneously overwrite non-selected nulls.

Release note: None

Co-authored-by: Jordan Lewis <jordanthelewis@gmail.com>
@craig
Copy link
Contributor

craig bot commented Sep 10, 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.

3 participants