Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Add option to GetSchema to only send the row count and data length over the wire #187

Merged
merged 1 commit into from
Dec 1, 2020

Conversation

ajm188
Copy link

@ajm188 ajm188 commented Nov 2, 2020

Add option to GetSchema to only send the row count and data length over the wire

Signed-off-by: Andrew Mason amason@slack-corp.com

@@ -2275,6 +2276,8 @@ func commandGetSchema(ctx context.Context, wr *wrangler.Wrangler, subFlags *flag
excludeTables := subFlags.String("exclude_tables", "", "Specifies a comma-separated list of tables to exclude. Each is either an exact match, or a regular expression of the form /regexp/")
includeViews := subFlags.Bool("include-views", false, "Includes views in the output")
tableNamesOnly := subFlags.Bool("table_names_only", false, "Only displays table names that match")
tableSizesOnly := subFlags.Bool("table_sizes_only", false, "Only displays size information for tables")
Copy link

Choose a reason for hiding this comment

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

I think we need to handle the case when both tableNamesOnly and tableSizesOnly are specified. The logic should be clear about what is returned. Now, it looks like only table names are returned.

@ajm188
Copy link
Author

ajm188 commented Nov 2, 2020

Corresponding upstream PR vitessio#6985

…er the wire (vitessio#6985)

* Add option to GetSchema to only send the row count and data length over the wire

Signed-off-by: Andrew Mason <amason@slack-corp.com>

* Update help text to clarify behavior

Signed-off-by: Andrew Mason <amason@slack-corp.com>

* Add endtoend test for vtctl GetSchema

Signed-off-by: Andrew Mason <amason@slack-corp.com>

* Alias the proto imports

Signed-off-by: Andrew Mason <amason@slack-corp.com>

* Format imports to match vtctl.go

Signed-off-by: Andrew Mason <amason@slack-corp.com>
@ajm188 ajm188 force-pushed the backport-am_get_schema_sizes_only branch from 215b3d5 to 0e5b756 Compare December 1, 2020 18:43
@ajm188
Copy link
Author

ajm188 commented Dec 1, 2020

@ameetkotian @setassociative this has been merged into upstream, this backports the final version

@ajm188 ajm188 merged commit 6266f25 into master Dec 1, 2020
@ajm188 ajm188 deleted the backport-am_get_schema_sizes_only branch December 1, 2020 18:49
setassociative pushed a commit that referenced this pull request Mar 17, 2021
Add option to GetSchema to only send the row count and data length over the wire
setassociative added a commit that referenced this pull request Mar 17, 2021
* Merge pull request #187 from tinyspeck/backport-am_get_schema_sizes_only

Add option to GetSchema to only send the row count and data length over the wire

* whitespace!

* derp, actually commit rm dead import

Signed-off-by: Richard Bailey <rbailey@slack-corp.com>

Co-authored-by: Andrew Mason <amason@slack-corp.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants