-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Support utf-16 in file and tail inputs #7792
Conversation
if recordFields[p.MeasurementColumn] != nil && recordFields[p.MeasurementColumn] != "" { | ||
measurementName = fmt.Sprintf("%v", recordFields[p.MeasurementColumn]) | ||
if p.MeasurementColumn != "" { | ||
if recordFields[p.MeasurementColumn] != nil && recordFields[p.MeasurementColumn] != "" { |
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.
how can you compare this without a type assertion?
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.
I wasn't sure about this existing code, so I added some tests, seems to be working. The conditional I added fixes a bug where the measurement name could be set to the value of an empty string named column.
Found this in the spec:
Interface values are comparable. Two interface values are equal if they have identical dynamic types and equal dynamic values or if both have value nil.
closes #7299
closes #6876
Also see changes on influxdata/tail: influxdata/tail@master...influxdata:open-reader-func
Required for all PRs: