Skip to content

Conversation

@WangXiangUSTC
Copy link
Contributor

@WangXiangUSTC WangXiangUSTC commented Oct 23, 2017

it is fix for issue #173

@WangXiangUSTC
Copy link
Contributor Author

@holys PTAL

schema/schema.go Outdated
}

currentIndex.AddColumn(colName, cardinality)
c, ok := cardinality.(int)
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we meet other types (not just int) here?

@NearTan
Copy link
Contributor

NearTan commented Oct 24, 2017

Some suggestions:

  • before push commit, your can use make test on cli to run local unit test
  • rebase upstream before create a new pull request could clean your commits list
@WangXiangUSTC
Copy link
Contributor Author

schema/schema.go Outdated
currentIndex.AddColumn(colName, c)
switch cardinality := cardinality.(type) {
case int, int8, int16, int32, int64, uint8, uint16, uint32, uint64:
Copy link
Collaborator

Choose a reason for hiding this comment

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

miss uint type

@holys
Copy link
Contributor

holys commented Oct 24, 2017

LGTM.
PTAL again @siddontang

schema/schema.go Outdated
currentIndex.AddColumn(colName, uint64(c))
case int64:
currentIndex.AddColumn(colName, uint64(c))
case uint8:
Copy link
Collaborator

Choose a reason for hiding this comment

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

miss uint type

schema/schema.go Outdated
case uint32:
currentIndex.AddColumn(colName, uint64(c))
case uint64:
currentIndex.AddColumn(colName, uint64(c))
Copy link
Collaborator

Choose a reason for hiding this comment

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

add default branch

WangXiangUSTC and others added 2 commits October 24, 2017 16:53
@siddontang
Copy link
Collaborator

LGTM

@siddontang siddontang merged commit bb3fceb into go-mysql-org:master Oct 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants