Skip to content

workload/schemachange: handle LTREE in mixed version CREATE TYPE#152170

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
rafiss:fix-rsw-create-typ
Aug 20, 2025
Merged

workload/schemachange: handle LTREE in mixed version CREATE TYPE#152170
craig[bot] merged 1 commit intocockroachdb:masterfrom
rafiss:fix-rsw-create-typ

Conversation

@rafiss
Copy link
Copy Markdown
Collaborator

@rafiss rafiss commented Aug 20, 2025

Using this type in a composite type in a mixed version cluster will cause UndefinedObject errors, so we need to make the workload aware of that.

informs #150547
Release note: None

Using this type in a composite type in a mixed version cluster will
cause UndefinedObject errors, so we need to make the workload aware of
that.

Release note: None
@rafiss rafiss requested review from a team and fqazi August 20, 2025 14:16
@rafiss rafiss requested a review from a team as a code owner August 20, 2025 14:16
@rafiss rafiss requested review from DarrylWong and srosenberg and removed request for a team August 20, 2025 14:16
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Collaborator

@fqazi fqazi left a comment

Choose a reason for hiding this comment

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

@fqazi reviewed 1 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @DarrylWong and @srosenberg)


pkg/workload/schemachange/operation_generator.go line 1371 at r1 (raw file):

		hasTypeWithPrefix := func(typePrefix string) bool {
			for _, field := range statement.CompositeTypeList {
				if strings.HasPrefix(field.Type.SQLString(), typePrefix) {

Would this also work on arrays?

Copy link
Copy Markdown
Collaborator

@fqazi fqazi left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @DarrylWong, @rafiss, and @srosenberg)


pkg/workload/schemachange/operation_generator.go line 1371 at r1 (raw file):

Previously, fqazi (Faizan Qazi) wrote…

Would this also work on arrays?

Or is that not a concern

Copy link
Copy Markdown
Collaborator

@fqazi fqazi 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 @DarrylWong and @srosenberg)


pkg/workload/schemachange/operation_generator.go line 1371 at r1 (raw file):

Previously, fqazi (Faizan Qazi) wrote…

Or is that not a concern

Done.

Nevermind this will work correctly, I mixed up the syntax in my head.

@rafiss
Copy link
Copy Markdown
Collaborator Author

rafiss commented Aug 20, 2025

tftr!

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Aug 20, 2025

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.

3 participants