Skip to content

Commit

Permalink
refactor: use any instead of interface{}
Browse files Browse the repository at this point in the history
  • Loading branch information
bednar committed Nov 11, 2024
1 parent 08cdc3e commit aa29313
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions influxdb3/query_iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,12 @@ func (i *QueryIterator) Raw() *flight.Reader {
return i.reader
}

func getArrowValue(arrayNoType arrow.Array, field arrow.Field, i int) (interface{}, responseColumnType, error) {
func getArrowValue(arrayNoType arrow.Array, field arrow.Field, i int) (any, responseColumnType, error) {
var columnType = responseColumnTypeUnknown
if arrayNoType.IsNull(i) {
return nil, columnType, nil
}
var value interface{}
var value any
switch arrayNoType.DataType().ID() {
case arrow.NULL:
value = nil

Check warning on line 205 in influxdb3/query_iterator.go

View check run for this annotation

Codecov / codecov/patch

influxdb3/query_iterator.go#L205

Added line #L205 was not covered by tests
Expand Down Expand Up @@ -269,7 +269,7 @@ func getArrowValue(arrayNoType arrow.Array, field arrow.Field, i int) (interface
return value, columnType, nil
}

func getMetadataType(metadata string, value interface{}, columnType responseColumnType) (interface{}, responseColumnType) {
func getMetadataType(metadata string, value any, columnType responseColumnType) (any, responseColumnType) {
switch metadata {
case "iox::column_type::field::integer":
if intValue, ok := value.(int64); ok {
Expand Down

0 comments on commit aa29313

Please sign in to comment.