Rename randomTableSuffix to randomNameSuffix#15008
Merged
Conversation
`randomTableSuffix()` is currently used for names of many things other than tables -- views, schemas or S3 bucket names. Let's give the method a better name.
ebyhr
approved these changes
Nov 14, 2022
Member
Author
kokosing
approved these changes
Nov 14, 2022
findinpath
reviewed
Nov 14, 2022
| } | ||
|
|
||
| @Deprecated | ||
| public static String randomTableSuffix() |
Contributor
There was a problem hiding this comment.
Just to avoid misunderstandings, do we still keep this method only to avoid eventual compile issues with ongoing PRs which may still be dependent on randomTableSuffix() utility method?
findinpath
approved these changes
Nov 14, 2022
hashhar
approved these changes
Nov 14, 2022
martint
reviewed
Nov 14, 2022
| // The length of 5 was proven not to be long enough for tables names in tests. | ||
| private static final int RANDOM_SUFFIX_LENGTH = 10; | ||
|
|
||
| public static String randomNameSuffix() |
Member
There was a problem hiding this comment.
Why even call it "suffix" now that it's a generic function? -- that would be dependent on how it's used. E.g., if someone called it like: x + randomNameSuffix + "-foo" it would not be a suffix and the usage would look weird. A name like randomName might be more appropriate.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
randomTableSuffix()is currently used for names of many things other than tables -- views, schemas or S3 bucket names.Let's give the method a better name.
(PR with secrets)