Skip to content

Conversation

@jeffswenson
Copy link
Collaborator

This adds a second point select row reader to the LDR crud writer. This is a work around for #32552.

This change also includes a small fix to the batch row reader. It now initializes the array parameter with the canonical type. This is required because the arguments come from the cdc event decoder and the event decoder always returns canonical datums.

Release note: none
Fixes: #148303

This adds a second point select row reader to the LDR crud writer. This
is a work around for cockroachdb#32552.

This change also includes a small fix to the batch row reader. It now
initializes the array parameter with the canonical type. This is
required because the arguments come from the cdc event decoder and the
event decoder always returns canonical datums.

Release note: none
Fixes: cockroachdb#148303
@jeffswenson jeffswenson requested a review from msbutler November 3, 2025 17:44
@jeffswenson jeffswenson requested a review from a team as a code owner November 3, 2025 17:44
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@jeffswenson
Copy link
Collaborator Author

I initially thought that arrays were the only issue the crud writer had with the random schema changer test, but I found a few more issues. #156794 is a draft PR that fully deflakes the random schema test. I'll pull pieces off of that PR and send them out for review.

testRows := []tree.Datums{
{
tree.NewDArrayFromDatums(types.Int, tree.Datums{tree.NewDInt(1), tree.NewDInt(2)}),
tree.NewDInt(0),
Copy link
Collaborator

Choose a reason for hiding this comment

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

these tree.NDInt(0) guys are just dummy non-pk values, correct? it's not strictly necessary to pass non-pk column values into reader.ReadRows(), right? No need to change anything, just want to confirm my understanding.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep! These values are there to simulate stale values in a read refresh. They could be DNULL or any other int value.

@jeffswenson
Copy link
Collaborator Author

Thanks for the review!

bors r+

@craig
Copy link
Contributor

craig bot commented Nov 4, 2025

@craig craig bot merged commit 6d96fe6 into cockroachdb:master Nov 4, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ldr: support array columns in the crud writer

3 participants