Skip to content

colexec: fix jsonb - string projection#57349

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
yuzefovich:fix-proj-string
Dec 2, 2020
Merged

colexec: fix jsonb - string projection#57349
craig[bot] merged 1 commit intocockroachdb:masterfrom
yuzefovich:fix-proj-string

Conversation

@yuzefovich
Copy link
Copy Markdown
Member

Bytes canonical type family represents several types, and whenever we're
performing a binary operation with one datum and one non-datum arguments
we need to convert the latter to the correct datum type. Previously, we
had an incorrect conversion for Minus operation.

Fixes: #57165.

Release note (bug fix): Previously, CockroachDB would encounter an
internal error when performing JSONB - String operation via the
vectorized execution engine, and this has been fixed. The bug was
introduced in 20.2.0 version.

@yuzefovich yuzefovich requested review from a team and asubiotto December 2, 2020 00:51
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@yuzefovich yuzefovich force-pushed the fix-proj-string branch 2 times, most recently from d8628d1 to 9c9bc68 Compare December 2, 2020 05:29
Copy link
Copy Markdown
Contributor

@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.

:lgtm: thanks for getting this fixed so quickly

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


pkg/sql/colexec/execgen/cmd/execgen/overloads_bin.go, line 813 at r1 (raw file):

		// JSONFetchVal) and both require the value to be of String type, so we
		// perform such conversion.
		// In order to mistakenly not add support for another binary operator in

nit: move this paragraph (starting from In order into the following case)

Bytes canonical type family represents several types, and whenever we're
performing a binary operation with one datum and one non-datum arguments
we need to convert the latter to the correct datum type. Previously, we
had an incorrect conversion for Minus operation.

Release note (bug fix): Previously, CockroachDB would encounter an
internal error when performing `JSONB - String` operation via the
vectorized execution engine, and this has been fixed. The bug was
introduced in 20.2.0 version.
Copy link
Copy Markdown
Member Author

@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.

TFTR!

bors r+

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

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Dec 2, 2020

Build succeeded:

@craig craig bot merged commit d3f73b9 into cockroachdb:master Dec 2, 2020
@yuzefovich yuzefovich deleted the fix-proj-string branch December 2, 2020 19:33
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.

colexec: wrong datum type with Bytes physical canonical type family

3 participants