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

sql/copy: fix planning for vectorized COPY with nested renderNodes #111284

Merged
merged 2 commits into from Sep 27, 2023

Conversation

cucaroach
Copy link
Contributor

A COPY insert statement can produce a plan with zero or more renderNodes
and we were only allowing zero or one. An example of multiple render
nodes is a table with a hash shared primary key.

Fixes: #104662
Release note (sql change): Vectorized COPY FROM support didn't properly
handle schemas hash sharded primary keys.
Epic: none

@cockroach-teamcity
Copy link
Member

This change is Reviewable

A COPY insert statement can produce a plan with zero or more renderNodes
and we were only allowing zero or one. An example of multiple render
nodes is a table with a hash shared primary key.

Fixes: cockroachdb#104662
Release note (sql change): Vectorized COPY FROM support didn't properly
handle schemas hash sharded primary keys.
Epic: none
Instead of names like TestDataDriven/copy_test#0 we can now use names
like:

TestDataDriven/copy_test/vectorize=off/atomic=on/fastPath=on/copy_from

Epic: none
Release note: None
@cucaroach cucaroach marked this pull request as ready for review September 27, 2023 13:50
@cucaroach cucaroach requested a review from a team as a code owner September 27, 2023 13:50
@cucaroach cucaroach requested review from msirek and yuzefovich and removed request for a team and msirek September 27, 2023 13:50
@yuzefovich yuzefovich added the backport-23.1.x Flags PRs that need to be backported to 23.1 label Sep 27, 2023
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! :lgtm:

Reviewed 3 of 3 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @cucaroach)

@cucaroach
Copy link
Contributor Author

bors r+

@craig
Copy link
Contributor

craig bot commented Sep 27, 2023

Build succeeded:

@craig craig bot merged commit 00b6f9b into cockroachdb:master Sep 27, 2023
8 checks passed
@blathers-crl
Copy link

blathers-crl bot commented Sep 27, 2023

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 872ceb9 to blathers/backport-release-23.1-111284: 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 23.1.x failed. See errors above.


🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-23.1.x Flags PRs that need to be backported to 23.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

copy: v23.1.2-custom: didn't insert all buffered rows and yet no error was reported. Inserted 0 out of 4 rows
3 participants