-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: formalize SchemaDiff as the only schema diffing mechanism #12885
Merged
deepthi
merged 4 commits into
vitessio:main
from
planetscale:schemadiff-remove-schema-diff-func
Apr 16, 2023
Merged
schemadiff: formalize SchemaDiff as the only schema diffing mechanism #12885
deepthi
merged 4 commits into
vitessio:main
from
planetscale:schemadiff-remove-schema-diff-func
Apr 16, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
Review ChecklistHello reviewers! 👋 Please follow this checklist when reviewing this Pull Request. General
If a new flag is being introduced:
If a workflow is added or modified:
Bug fixes
Non-trivial changes
New/Existing features
Backward compatibility
|
dbussink
approved these changes
Apr 14, 2023
deepthi
approved these changes
Apr 16, 2023
shlomi-noach
added a commit
to vitessio/website
that referenced
this pull request
Apr 17, 2023
Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
This was referenced Apr 18, 2023
shlomi-noach
added a commit
to vitessio/website
that referenced
this pull request
Apr 24, 2023
* blog post: schemadiff Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * more progress Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * push date Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * towards schemadiff blog Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * ongoing schemadiff blog content Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * content complete Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * remove duplicate intros Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fixes per review Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * typo Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * grammar Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * minor improvements Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * minor rewording Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * Update content/en/blog/2023-04-15-schemadiff.md Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com> Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fixes per review Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * grammar: SQL diff Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * grammar Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * grammar Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * fixes per review Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * better example Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * clarify foreign key sentence Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * s/resolves/computes Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * publish date Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * publish date Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * adapt to changes in vitessio/vitess#12885 Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> * removed old entry Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Co-authored-by: Deepthi Sigireddi <deepthi@planetscale.com>
frouioui
pushed a commit
to planetscale/vitess
that referenced
this pull request
Nov 21, 2023
…nly schema diffing mechanism (vitessio#1923) * cherry pick of 12885 * empty commit to kick CI Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> --------- Signed-off-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com> Co-authored-by: Shlomi Noach <2607934+shlomi-noach@users.noreply.github.com>
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)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Followup to #12551
This PR hides the original
Schema.Diff()
function asSchema.diff()
, leavingSchemaDiff()
as the only mechanism for diffing two schemas.The resulting
SchemaDiff
object offers these two public functions for getting the diffs:OrderedDiffs()
: typically this is what you want to use; a linearized slice of diffs, which are guaranteed to be conflict free and keep the schema valid at each step (a non-nil error is returned if it is impossible to get a conflict free list)UnorderedDiffs()
: a list of diffs - same diffs as above - but in non guaranteed and non-tested order. The order will work in the vast majority of cases and uses some basic heuristics. The use case for this function is for when the aboveOrderedDiffs()
fails and one still wants to put their hands on a list of diffs.Related Issue(s)
Checklist
Deployment Notes