Skip to content

workload/schemachange: add enum support#54351

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
ajwerner:ajwerner/add-enum-to-schemachange-workload
Sep 14, 2020
Merged

workload/schemachange: add enum support#54351
craig[bot] merged 1 commit intocockroachdb:masterfrom
ajwerner:ajwerner/add-enum-to-schemachange-workload

Conversation

@ajwerner
Copy link
Copy Markdown
Contributor

This commit adds support for creating enums, adding enum columns, and using
enums to insert data into rows. This found a bug so I'm pleased.

Release note: None

@ajwerner ajwerner requested a review from otan September 14, 2020 16:34
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@otan otan left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 2 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @ajwerner and @otan)


pkg/workload/schemachange/schemachange.go, line 1104 at r1 (raw file):

         AND typcategory = 'E'
         AND typname = $1
ORDER BY gen_random_uuid();`, name.Object())

should we sort by enum order here, and makerng would be in charge of picking a randomly assigned element (for reproducible runs)?
(also, not sure I follow why we are sorting by random)

This commit adds support for creating enums, adding enum columns, and using
enums to insert data into rows. This found a bug so I'm pleased.

Release note: None
@ajwerner ajwerner force-pushed the ajwerner/add-enum-to-schemachange-workload branch from 904adaa to 4028be7 Compare September 14, 2020 16:42
@blathers-crl blathers-crl bot requested a review from otan September 14, 2020 16:42
Copy link
Copy Markdown
Contributor Author

@ajwerner ajwerner 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 @otan)


pkg/workload/schemachange/schemachange.go, line 1104 at r1 (raw file):

Previously, otan (Oliver Tan) wrote…

should we sort by enum order here, and makerng would be in charge of picking a randomly assigned element (for reproducible runs)?
(also, not sure I follow why we are sorting by random)

No good reason. Done.

Copy link
Copy Markdown
Contributor

@otan otan left a comment

Choose a reason for hiding this comment

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

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

@ajwerner
Copy link
Copy Markdown
Contributor Author

TFTR!

bors r=otan

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Sep 14, 2020

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Sep 14, 2020

Build succeeded:

@craig craig bot merged commit 5ec2eab into cockroachdb:master Sep 14, 2020
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.

3 participants