Skip to content

coexec: normalize the timestamp subtraction like postgres#83944

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
yuzefovich:fix-minus-ts
Jul 7, 2022
Merged

coexec: normalize the timestamp subtraction like postgres#83944
craig[bot] merged 1 commit intocockroachdb:masterfrom
yuzefovich:fix-minus-ts

Conversation

@yuzefovich
Copy link
Copy Markdown
Member

This commit fixes an oversight of #56667 (which fixed the normalization
of the timestamp subtraction) where we forgot to update the vectorized
code path as well. The regression tests added in that PR happened to be
complex enough so that the vectorized engine would fall back to wrapping
a row-by-row processor, so they didn't catch this.

Fixes: #83094.

Release note (bug fix): CockroachDB previously would not normalize
timestamp/timestamptz - timestamp/timestamptz like Postgres does in
some cases (depending on the query), and this is now fixed.

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

This commit fixes an oversight of cockroachdb#56667 (which fixed the normalization
of the timestamp subtraction) where we forgot to update the vectorized
code path as well. The regression tests added in that PR happened to be
complex enough so that the vectorized engine would fall back to wrapping
a row-by-row processor, so they didn't catch this.

Release note (bug fix): CockroachDB previously would not normalize
`timestamp/timestamptz - timestamp/timestamptz` like Postgres does in
some cases (depending on the query), and this is now fixed.
Copy link
Copy Markdown
Collaborator

@DrewKimball DrewKimball left a comment

Choose a reason for hiding this comment

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

:lgtm:

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

@yuzefovich
Copy link
Copy Markdown
Member Author

TFTRs!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jul 7, 2022

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Jul 7, 2022

Build succeeded:

@craig craig bot merged commit 1abab4c into cockroachdb:master Jul 7, 2022
@blathers-crl
Copy link
Copy Markdown

blathers-crl bot commented Jul 7, 2022

Encountered an error creating backports. Some common things that can go wrong:

  1. The backport branch might have already existed.
  2. There was a merge conflict.
  3. The backport branch contained merge commits.

You might need to create your backport manually using the backport tool.


error creating merge commit from 52737fb to blathers/backport-release-21.2-83944: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 21.2.x failed. See errors above.


error creating merge commit from 52737fb to blathers/backport-release-22.1-83944: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict []

you may need to manually resolve merge conflicts with the backport tool.

Backport to branch 22.1.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

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.

sql: vectorized engine incorrectly formats interval output

4 participants