Skip to content

Conversation

@cristiangreco
Copy link
Contributor

@cristiangreco cristiangreco commented Mar 27, 2025

PR Description

Fetch index expression, if present, and store it in the index spec.

Which issue(s) this PR fixes

n.a.

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

@cristiangreco cristiangreco force-pushed the cristian/dbo11y-table-index-expr branch from 585c193 to 024fb8b Compare March 27, 2025 15:28
@cristiangreco cristiangreco marked this pull request as ready for review March 27, 2025 15:34
@CLAassistant
Copy link

CLAassistant commented Apr 2, 2025

CLA assistant check
All committers have signed the CLA.


if columnName.Valid {
lastIndex.Columns = append(lastIndex.Columns, columnName.String)
} else if expression.Valid {
Copy link
Contributor

Choose a reason for hiding this comment

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

What if you have both a columnName and expression?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Docs says they are mutually exclusive, and there's no syntax in current mysql versions to create an index with both a column and an expression. We could add support for such a possible edge case, but I'm thinking it might be better to do it when/if we find anything odd (just to avoid supporting all possible edge cases as it makes the code harder to follow).

@cristiangreco cristiangreco force-pushed the cristian/dbo11y-table-index-expr branch from 024fb8b to 7d8c2a6 Compare April 8, 2025 08:31
Fetch index expresssion, if present, and store it in the index spec.
@cristiangreco cristiangreco force-pushed the cristian/dbo11y-table-index-expr branch from 7d8c2a6 to ed82078 Compare April 8, 2025 13:26
@cristiangreco cristiangreco enabled auto-merge (squash) April 9, 2025 10:04
@cristiangreco cristiangreco merged commit daf31c3 into main Apr 9, 2025
33 checks passed
@cristiangreco cristiangreco deleted the cristian/dbo11y-table-index-expr branch April 9, 2025 10:25
matthewnolf pushed a commit that referenced this pull request Apr 9, 2025
…on (#3132)

Fetch index expresssion, if present, and store it in the index spec.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants