Skip to content

Commit 8ee3beb

Browse files
authored
Renaming unused parameters to _ (#937)
* Renaming unused parameters to `_` * Update golangci-lint action * Renaming unused parameters to `_`
1 parent 3139e12 commit 8ee3beb

30 files changed

+162
-177
lines changed

.github/workflows/golangci-lint.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
- uses: actions/checkout@v4
2929

3030
- name: golangci-lint
31-
uses: golangci/golangci-lint-action@v6.0.1
31+
uses: golangci/golangci-lint-action@v6.1.1
3232
with:
33-
version: v1.55.2
33+
args: --timeout=10m
34+
version: v1.62.2

aggregate_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ func TestAggregateInconsistentSchema(t *testing.T) {
123123
[]logicalplan.Expr{logicalplan.Col("labels.label2")},
124124
).
125125
Project(testCase.fn(logicalplan.Col("value")).Alias(testCase.alias)).
126-
Execute(context.Background(), func(ctx context.Context, r arrow.Record) error {
126+
Execute(context.Background(), func(_ context.Context, r arrow.Record) error {
127127
r.Retain()
128128
res = r
129129
return nil
@@ -237,7 +237,7 @@ func TestAggregationProjection(t *testing.T) {
237237
logicalplan.DynCol("labels"),
238238
logicalplan.Col("timestamp").Gt(logicalplan.Literal(1)).Alias("timestamp"),
239239
).
240-
Execute(context.Background(), func(ctx context.Context, ar arrow.Record) error {
240+
Execute(context.Background(), func(_ context.Context, ar arrow.Record) error {
241241
records = append(records, ar)
242242
ar.Retain()
243243
return nil
@@ -425,7 +425,7 @@ func BenchmarkAggregation(b *testing.B) {
425425
}} {
426426
b.Run(bc.name, func(b *testing.B) {
427427
for i := 0; i < b.N; i++ {
428-
_ = bc.builder.Execute(ctx, func(ctx context.Context, r arrow.Record) error {
428+
_ = bc.builder.Execute(ctx, func(_ context.Context, _ arrow.Record) error {
429429
return nil
430430
})
431431
}
@@ -510,7 +510,7 @@ func Test_Aggregation_DynCol(t *testing.T) {
510510
[]*logicalplan.AggregationFunction{logicalplan.Max(logicalplan.DynCol("foo"))},
511511
nil,
512512
).
513-
Execute(context.Background(), func(ctx context.Context, ar arrow.Record) error {
513+
Execute(context.Background(), func(_ context.Context, ar arrow.Record) error {
514514
require.Equal(t, 3, int(ar.NumCols()))
515515
require.Equal(t, 1, int(ar.NumRows()))
516516
return nil

bench_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func getLatest15MinInterval(ctx context.Context, b testing.TB, engine *query.Loc
7979
},
8080
nil,
8181
).Execute(ctx,
82-
func(ctx context.Context, r arrow.Record) error {
82+
func(_ context.Context, r arrow.Record) error {
8383
r.Retain()
8484
result = r
8585
return nil
@@ -204,7 +204,7 @@ func getDeterministicLabelValuePairForType(ctx context.Context, engine *query.Lo
204204
if err := engine.ScanTable(tableName).
205205
Filter(logicalplan.And(typeFilter...)).
206206
Distinct(logicalplan.Col(label)).
207-
Execute(ctx, func(ctx context.Context, r arrow.Record) error {
207+
Execute(ctx, func(_ context.Context, r arrow.Record) error {
208208
arr := r.Column(0)
209209
for i := 0; i < arr.Len(); i++ {
210210
if arr.IsNull(i) {
@@ -257,7 +257,7 @@ func BenchmarkQuery(b *testing.B) {
257257
b.Run("Types", func(b *testing.B) {
258258
for i := 0; i < b.N; i++ {
259259
if err := getTypesQuery(engine).
260-
Execute(ctx, func(ctx context.Context, r arrow.Record) error {
260+
Execute(ctx, func(_ context.Context, r arrow.Record) error {
261261
if r.NumRows() == 0 {
262262
b.Fatal("expected at least one row")
263263
}
@@ -270,7 +270,7 @@ func BenchmarkQuery(b *testing.B) {
270270

271271
b.Run("Labels", func(b *testing.B) {
272272
for i := 0; i < b.N; i++ {
273-
if err := getLabelsQuery(engine).Execute(ctx, func(ctx context.Context, r arrow.Record) error {
273+
if err := getLabelsQuery(engine).Execute(ctx, func(_ context.Context, r arrow.Record) error {
274274
if r.NumRows() == 0 {
275275
b.Fatal("expected at least one row")
276276
}
@@ -284,7 +284,7 @@ func BenchmarkQuery(b *testing.B) {
284284
b.Run("Values", func(b *testing.B) {
285285
for i := 0; i < b.N; i++ {
286286
if err := getValuesForLabelQuery(engine, label).
287-
Execute(ctx, func(ctx context.Context, r arrow.Record) error {
287+
Execute(ctx, func(_ context.Context, r arrow.Record) error {
288288
if r.NumRows() == 0 {
289289
b.Fatal("expected at least one row")
290290
}
@@ -310,7 +310,7 @@ func BenchmarkQuery(b *testing.B) {
310310
logicalplan.Col("stacktrace"),
311311
},
312312
).
313-
Execute(ctx, func(ctx context.Context, r arrow.Record) error {
313+
Execute(ctx, func(_ context.Context, r arrow.Record) error {
314314
if r.NumRows() == 0 {
315315
b.Fatal("expected at least one row")
316316
}
@@ -337,7 +337,7 @@ func BenchmarkQuery(b *testing.B) {
337337
logicalplan.Col("timestamp"),
338338
},
339339
).
340-
Execute(ctx, func(ctx context.Context, r arrow.Record) error {
340+
Execute(ctx, func(_ context.Context, r arrow.Record) error {
341341
if r.NumRows() == 0 {
342342
b.Fatal("expected at least one row")
343343
}
@@ -360,7 +360,7 @@ func BenchmarkQuery(b *testing.B) {
360360
Filter(
361361
logicalplan.And(fullFilter...),
362362
).
363-
Execute(ctx, func(ctx context.Context, r arrow.Record) error {
363+
Execute(ctx, func(_ context.Context, r arrow.Record) error {
364364
if r.NumRows() == 0 {
365365
b.Fatal("expected at least one row")
366366
}

db.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,14 @@ import (
1515
"sync/atomic"
1616
"time"
1717

18-
"go.opentelemetry.io/otel/trace/noop"
19-
2018
"github.com/apache/arrow/go/v16/arrow/ipc"
2119
"github.com/apache/arrow/go/v16/arrow/util"
2220
"github.com/go-kit/log"
2321
"github.com/go-kit/log/level"
2422
"github.com/oklog/ulid/v2"
2523
"github.com/prometheus/client_golang/prometheus"
2624
"go.opentelemetry.io/otel/trace"
25+
"go.opentelemetry.io/otel/trace/noop"
2726
"golang.org/x/exp/maps"
2827
"golang.org/x/sync/errgroup"
2928
"google.golang.org/protobuf/proto"

0 commit comments

Comments
 (0)