-
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
plan: get correct columns #5846
Conversation
@@ -181,6 +181,22 @@ func (t *TableInfo) GetPkColInfo() *ColumnInfo { | |||
return nil | |||
} | |||
|
|||
// Cols returns the columns of the table in public state. | |||
func (t *TableInfo) Cols() []*ColumnInfo { |
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.
This will be called many times. Could you pre-calculate this?
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.
you can save the publicColumns in TableInfo.
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.
It's only called in ToPB
.
Later we can change the order of columns in DDL, then we don't need to allocate memories.
LGTM |
1 similar comment
LGTM |
/run-all-tests |
/run-integration-common-test |
/run-integration-common-test |
#5818