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

col{data,serde}: various fixes related to TestArrowBatchConverterRandom #37745

Merged
merged 2 commits into from
May 23, 2019
Merged

col{data,serde}: various fixes related to TestArrowBatchConverterRandom #37745

merged 2 commits into from
May 23, 2019

Conversation

asubiotto
Copy link
Contributor

See individual commits for details

Fixes #37458
Fixes #37692

The check was previously `!= 0`, which checks if any element is
not-null. We change this to fill the rest of the bitmap with 1s similar
to when allocating a new bitmap and then checking for a onesMask (i.e.
if that check fails, at least one element is 0, or null).

This commit also adds naive copying of null bitmaps in coldata.Vec.Copy,
which wasn't implemented for some reason.

Release note: None
These were modified in place.

Release note: None
@asubiotto asubiotto requested review from solongordon, rafiss and a team May 22, 2019 20:02
@cockroach-teamcity
Copy link
Member

This change is Reviewable

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.

:lgtm:

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


pkg/sql/exec/coldata/nulls.go, line 268 at r1 (raw file):

	for i := 0; i < len(bm); i++ {
		if bm[i] != onesMask {

Oops, I think maybe you pointed this out when reviewing my code and I forgot to fix it. Thanks.

Copy link
Contributor Author

@asubiotto asubiotto left a comment

Choose a reason for hiding this comment

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

bors r=solongordon

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @rafiss and @solongordon)


pkg/sql/exec/coldata/nulls.go, line 268 at r1 (raw file):

Previously, solongordon (Solon) wrote…

Oops, I think maybe you pointed this out when reviewing my code and I forgot to fix it. Thanks.

All good!

craig bot pushed a commit that referenced this pull request May 23, 2019
37744: sql: improve interval math for div and mul r=mjibson a=mjibson

In #37582 we added correct `interval * float` semantics. Here we extend that to
float division.

In addition, change int division to be a wrapper around float division so that
remainders are correctly handled. Int multiply has no need to change since it's
lossless.

Release note (sql change): Correct interval math when multiplying or dividing
by floats or ints.

37745: col{data,serde}: various fixes related to TestArrowBatchConverterRandom r=solongordon a=asubiotto

See individual commits for details

Fixes #37458
Fixes #37692

Co-authored-by: Matt Jibson <matt.jibson@gmail.com>
Co-authored-by: Alfonso Subiotto Marqués <alfonso@cockroachlabs.com>
@craig
Copy link
Contributor

craig bot commented May 23, 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
3 participants