Skip to content
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: fixed comments warning. #3187

Merged
merged 5 commits into from May 1, 2017

Conversation

zhexuany
Copy link
Contributor

No description provided.

@zhexuany zhexuany changed the title fixed comments warning in executor executor: fixed comments warning. Apr 29, 2017
@@ -449,6 +449,7 @@ func escapeCols(strs [][]byte) []string {
return ret
}

// escape ...
Copy link
Member

Choose a reason for hiding this comment

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

escape handles escape characters when running load data statement.

@@ -682,6 +683,7 @@ func (e *InsertExec) Close() error {
return nil
}

// getColumns ...
Copy link
Member

Choose a reason for hiding this comment

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

getColumns gets the explicitly specified columns of an insert statement. There are three cases:

@@ -365,6 +365,7 @@ func (b *executorBuilder) buildUnionScanExec(v *plan.PhysicalUnionScan) Executor
return us
}

// buildMergeJoin ...
Copy link
Member

Choose a reason for hiding this comment

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

buildMergeJoin builds SortMergeJoin executor.

executor/show.go Outdated
@@ -329,6 +329,7 @@ func (e *ShowExec) fetchShowIndex() error {
return nil
}

// fetchShowCharset ...
Copy link
Member

Choose a reason for hiding this comment

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

fetchShowCharset gets all charset information and fill them into e.rows.

@zhexuany
Copy link
Contributor Author

@shenli DONE. PTAL.

@shenli
Copy link
Member

shenli commented Apr 30, 2017

LGTM

@shenli
Copy link
Member

shenli commented Apr 30, 2017

@coocood @hanfei1991 @tiancaiamao PTAL

@@ -77,7 +77,7 @@ func (a *recordSet) Close() error {

// statement implements the ast.Statement interface, it builds a plan.Plan to an ast.Statement.
type statement struct {
// The InfoSchema cannot change during execution, so we hold a reference to it.
// is is the InfoSchema cannot change during execution, so we hold a reference to it.
Copy link
Member

@coocood coocood Apr 30, 2017

Choose a reason for hiding this comment

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

// is ...
// The InfoSchema cannot change during execution, so we hold a reference to it.

@@ -30,7 +30,7 @@ import (
// 2. For other cases its preferred not to use SMJ and operator
// will throw error.
type MergeJoinExec struct {
// Left is always the driver side
Copy link
Member

Choose a reason for hiding this comment

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

This comment describes several fields below.

@@ -43,7 +43,7 @@ type MergeJoinExec struct {
cursor int
defaultValues []types.Datum

// Default for both side in case full join
Copy link
Member

Choose a reason for hiding this comment

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

Ditto

@@ -283,7 +283,7 @@ const (
attrAggregate = "Agg"
)

// Not all attributes is used to create the label, because we don't want too many labels.
Copy link
Member

Choose a reason for hiding this comment

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

// toLabal ...

@@ -66,7 +66,7 @@ func (udb *dirtyDB) getDirtyTable(tid int64) *dirtyTable {
}

type dirtyTable struct {
// key is handle.
// addedRows is a map whose key is handle.
Copy link
Member

Choose a reason for hiding this comment

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

// addedRows ...
// The key is handle.

@@ -1091,7 +1093,7 @@ type UpdateExec struct {
SelectExec Executor
OrderedList []*expression.Assignment

// Map for unique (Table, handle) pair.
// updatedRowKeys is map for unique (Table, handle) pair.
Copy link
Member

Choose a reason for hiding this comment

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

is a map

@@ -68,7 +68,8 @@ type lookupTableTask struct {

// The handles fetched from index is originally ordered by index, but we need handles to be ordered by itself
// to do table request.
// The indexOrder map is used to save the original index order for the handles.

Copy link
Member

Choose a reason for hiding this comment

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

The above comment is used to comment indexOrder, we should not add an empty line.

@@ -81,6 +81,7 @@ const (
codeErrBuildExec terror.ErrCode = 9
codeBatchInsertFail terror.ErrCode = 10
// MySQL error code

Copy link
Member

Choose a reason for hiding this comment

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

Here is the downside of goword, when we need to comment several fields, goword makes it harder to read.

@coocood
Copy link
Member

coocood commented May 1, 2017

LGTM

@coocood coocood merged commit 858d76b into pingcap:master May 1, 2017
@zhexuany zhexuany deleted the fixed_comments_in_executor branch May 1, 2017 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants