Skip to content

Commit

Permalink
fix: linter
Browse files Browse the repository at this point in the history
  • Loading branch information
bednar committed Nov 5, 2024
1 parent ff0e817 commit 69015e5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions influxdb3/query_iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,17 +125,18 @@ func (i *QueryIterator) AsPoints() *PointValues {
continue
}

if columnType == responseColumnTypeUnknown {
switch {
case columnType == responseColumnTypeUnknown:
if timestampValue, isTimestamp := value.(arrow.Timestamp); isTimestamp && name == "time" {
p.SetTimestamp(timestampValue.ToTime(arrow.Nanosecond))
} else {
p.SetField(name, value)
}
} else if columnType == responseColumnTypeField {
case columnType == responseColumnTypeField:
p.SetField(name, value)
} else if columnType == responseColumnTypeTag {
case columnType == responseColumnTypeTag:
p.SetTag(name, value.(string))
} else if columnType == responseColumnTypeTimestamp {
case columnType == responseColumnTypeTimestamp:
p.SetTimestamp(value.(time.Time))
}
}
Expand Down

0 comments on commit 69015e5

Please sign in to comment.