-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
executor: support range column in show create table #6332
executor: support range column in show create table #6332
Conversation
/run-all-tests |
executor/show.go
Outdated
multipleLt := false | ||
for j, lessThan := range def.LessThan { | ||
if j > 0 { | ||
lessThans = lessThans + "," + lessThan |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use strings.Join
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the difference between strings.Join
and +
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE
executor/show.go
Outdated
if i < len(partitionInfo.Definitions)-1 { | ||
buf.WriteString(fmt.Sprintf(" PARTITION %s VALUES LESS THAN %s,\n", def.Name, def.LessThan[0])) | ||
if multipleLt { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just check it outside this if
block and add ()
to lessThans
if necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DONE
@lamxTyler PTAL |
LGTM |
ee4a3de
to
8a64c58
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/run-all-tests |
This PR aims to support range columns partition in show create table statement.