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

schemadiff: EntityDiff has a 'Entities() (from Entity, to Entity)' function #10161

Merged
merged 1 commit into from
Apr 28, 2022

Conversation

shlomi-noach
Copy link
Contributor

Description

Entities() (from Entity, to Entity) return from "from" and "to" entities for the diff.

  • When the diff is e.g. a AlterTableEntityDiff, this returns both the "from"'s CreateTable and the "to"s CreateTable.
  • if the diff is a CreateTableEntityDiff then there's only a "to" ; "from" is nil.
  • if the diff is a DropTableEntityDiff then there's only a "from" ; "to" is nil.

this is symmetrical in View diffs.

Checklist

  • "Backport me!" label has been added if this change should be backported
  • Tests were added or are not required
  • Documentation was added or is not required

cc @dbussink

Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
@shlomi-noach shlomi-noach added Type: Enhancement Logical improvement (somewhere between a bug and feature) Component: Query Serving release notes none labels Apr 28, 2022
@shlomi-noach shlomi-noach requested review from dbussink and a team April 28, 2022 11:30
@shlomi-noach shlomi-noach changed the title schemactl: EntityDiff has a 'Entities() (from Entity, to Entity)' function schemadiff: EntityDiff has a 'Entities() (from Entity, to Entity)' function Apr 28, 2022
@shlomi-noach
Copy link
Contributor Author

Cluster (20) is the remaining failing test. At this time we know it ia flaky and not rewuired. Merging.

@shlomi-noach shlomi-noach merged commit 02b20f6 into vitessio:main Apr 28, 2022
@shlomi-noach shlomi-noach deleted the schemadiff-entity-name branch April 28, 2022 13:29
@shlomi-noach
Copy link
Contributor Author

Tracking issue: #10203

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Query Serving Type: Enhancement Logical improvement (somewhere between a bug and feature)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants