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

fix: ensure information_schema default values for identity columns without explicit sequence options #119459

Merged
merged 1 commit into from Mar 18, 2024

Conversation

andrew-delph
Copy link
Contributor

@andrew-delph andrew-delph commented Feb 21, 2024

This commit addresses the issue where identity columns created without explicit sequence options lacked
default values in the information_schema. The changes ensure that identity columns have default identity attributes, aligning with the expected behavior when sequence options are specified.

Epic: None
Release note (bug fix): Identity columns without
specified sequence options now correctly show default values for identity attributes in information_schema.

@andrew-delph andrew-delph requested a review from a team as a code owner February 21, 2024 15:39
Copy link

blathers-crl bot commented Feb 21, 2024

Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR.

My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI.

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

@blathers-crl blathers-crl bot added the O-community Originated from the community label Feb 21, 2024
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link

blathers-crl bot commented Feb 21, 2024

Thank you for updating your pull request.

My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI.

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

…thout explicit sequence options

This commit addresses the issue where identity columns
created without explicit sequence options lacked
default values in the information_schema. The changes
ensure that identity columns have default identity
attributes, aligning with the expected behavior when
sequence options are specified.

Release note (bug fix): Identity columns without
specified sequence options now correctly show default
values for identity attributes in information_schema.
@andrew-delph
Copy link
Contributor Author

andrew-delph commented Mar 13, 2024

After taking another look at this, I'm not sure if its making some code here redundant.
https://github.com/cockroachdb/cockroach/blob/master/pkg/sql/catalog/tabledesc/column.go#L267

And also in this place, where I didn't include a change.
https://github.com/cockroachdb/cockroach/blob/master/pkg/sql/information_schema.go#L538
Possibly It could assert because its no longer possible.

Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

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

nice fix! thank you

bors r+

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

@craig
Copy link
Contributor

craig bot commented Mar 18, 2024

@craig craig bot merged commit b689a80 into cockroachdb:master Mar 18, 2024
8 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-community Originated from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants