- Notifications
You must be signed in to change notification settings - Fork 1k
fix bug when cardinality is nil #174
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
Conversation
change field to column
| @holys PTAL |
schema/schema.go Outdated
| } | ||
| | ||
| currentIndex.AddColumn(colName, cardinality) | ||
| c, ok := cardinality.(int) |
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.
can we meet other types (not just int) here?
| Some suggestions:
|
| @NearTan Ok |
schema/schema.go Outdated
| currentIndex.AddColumn(colName, c) | ||
| switch cardinality := cardinality.(type) { | ||
| case int, int8, int16, int32, int64, uint8, uint16, uint32, uint64: |
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.
miss uint type
| LGTM. |
schema/schema.go Outdated
| currentIndex.AddColumn(colName, uint64(c)) | ||
| case int64: | ||
| currentIndex.AddColumn(colName, uint64(c)) | ||
| case uint8: |
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.
miss uint type
schema/schema.go Outdated
| case uint32: | ||
| currentIndex.AddColumn(colName, uint64(c)) | ||
| case uint64: | ||
| currentIndex.AddColumn(colName, uint64(c)) |
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.
add default branch
| LGTM |
it is fix for issue #173