Skip to content
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

Renaming unused parameters to _ #937

Merged
merged 3 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
- uses: actions/checkout@v4

- name: golangci-lint
uses: golangci/golangci-lint-action@v6.0.1
uses: golangci/golangci-lint-action@v6.1.1
with:
version: v1.55.2
args: --timeout=10m
version: v1.62.2
8 changes: 4 additions & 4 deletions aggregate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func TestAggregateInconsistentSchema(t *testing.T) {
[]logicalplan.Expr{logicalplan.Col("labels.label2")},
).
Project(testCase.fn(logicalplan.Col("value")).Alias(testCase.alias)).
Execute(context.Background(), func(ctx context.Context, r arrow.Record) error {
Execute(context.Background(), func(_ context.Context, r arrow.Record) error {
r.Retain()
res = r
return nil
Expand Down Expand Up @@ -237,7 +237,7 @@ func TestAggregationProjection(t *testing.T) {
logicalplan.DynCol("labels"),
logicalplan.Col("timestamp").Gt(logicalplan.Literal(1)).Alias("timestamp"),
).
Execute(context.Background(), func(ctx context.Context, ar arrow.Record) error {
Execute(context.Background(), func(_ context.Context, ar arrow.Record) error {
records = append(records, ar)
ar.Retain()
return nil
Expand Down Expand Up @@ -425,7 +425,7 @@ func BenchmarkAggregation(b *testing.B) {
}} {
b.Run(bc.name, func(b *testing.B) {
for i := 0; i < b.N; i++ {
_ = bc.builder.Execute(ctx, func(ctx context.Context, r arrow.Record) error {
_ = bc.builder.Execute(ctx, func(_ context.Context, _ arrow.Record) error {
return nil
})
}
Expand Down Expand Up @@ -510,7 +510,7 @@ func Test_Aggregation_DynCol(t *testing.T) {
[]*logicalplan.AggregationFunction{logicalplan.Max(logicalplan.DynCol("foo"))},
nil,
).
Execute(context.Background(), func(ctx context.Context, ar arrow.Record) error {
Execute(context.Background(), func(_ context.Context, ar arrow.Record) error {
require.Equal(t, 3, int(ar.NumCols()))
require.Equal(t, 1, int(ar.NumRows()))
return nil
Expand Down
16 changes: 8 additions & 8 deletions bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func getLatest15MinInterval(ctx context.Context, b testing.TB, engine *query.Loc
},
nil,
).Execute(ctx,
func(ctx context.Context, r arrow.Record) error {
func(_ context.Context, r arrow.Record) error {
r.Retain()
result = r
return nil
Expand Down Expand Up @@ -204,7 +204,7 @@ func getDeterministicLabelValuePairForType(ctx context.Context, engine *query.Lo
if err := engine.ScanTable(tableName).
Filter(logicalplan.And(typeFilter...)).
Distinct(logicalplan.Col(label)).
Execute(ctx, func(ctx context.Context, r arrow.Record) error {
Execute(ctx, func(_ context.Context, r arrow.Record) error {
arr := r.Column(0)
for i := 0; i < arr.Len(); i++ {
if arr.IsNull(i) {
Expand Down Expand Up @@ -257,7 +257,7 @@ func BenchmarkQuery(b *testing.B) {
b.Run("Types", func(b *testing.B) {
for i := 0; i < b.N; i++ {
if err := getTypesQuery(engine).
Execute(ctx, func(ctx context.Context, r arrow.Record) error {
Execute(ctx, func(_ context.Context, r arrow.Record) error {
if r.NumRows() == 0 {
b.Fatal("expected at least one row")
}
Expand All @@ -270,7 +270,7 @@ func BenchmarkQuery(b *testing.B) {

b.Run("Labels", func(b *testing.B) {
for i := 0; i < b.N; i++ {
if err := getLabelsQuery(engine).Execute(ctx, func(ctx context.Context, r arrow.Record) error {
if err := getLabelsQuery(engine).Execute(ctx, func(_ context.Context, r arrow.Record) error {
if r.NumRows() == 0 {
b.Fatal("expected at least one row")
}
Expand All @@ -284,7 +284,7 @@ func BenchmarkQuery(b *testing.B) {
b.Run("Values", func(b *testing.B) {
for i := 0; i < b.N; i++ {
if err := getValuesForLabelQuery(engine, label).
Execute(ctx, func(ctx context.Context, r arrow.Record) error {
Execute(ctx, func(_ context.Context, r arrow.Record) error {
if r.NumRows() == 0 {
b.Fatal("expected at least one row")
}
Expand All @@ -310,7 +310,7 @@ func BenchmarkQuery(b *testing.B) {
logicalplan.Col("stacktrace"),
},
).
Execute(ctx, func(ctx context.Context, r arrow.Record) error {
Execute(ctx, func(_ context.Context, r arrow.Record) error {
if r.NumRows() == 0 {
b.Fatal("expected at least one row")
}
Expand All @@ -337,7 +337,7 @@ func BenchmarkQuery(b *testing.B) {
logicalplan.Col("timestamp"),
},
).
Execute(ctx, func(ctx context.Context, r arrow.Record) error {
Execute(ctx, func(_ context.Context, r arrow.Record) error {
if r.NumRows() == 0 {
b.Fatal("expected at least one row")
}
Expand All @@ -360,7 +360,7 @@ func BenchmarkQuery(b *testing.B) {
Filter(
logicalplan.And(fullFilter...),
).
Execute(ctx, func(ctx context.Context, r arrow.Record) error {
Execute(ctx, func(_ context.Context, r arrow.Record) error {
if r.NumRows() == 0 {
b.Fatal("expected at least one row")
}
Expand Down
3 changes: 1 addition & 2 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@ import (
"sync/atomic"
"time"

"go.opentelemetry.io/otel/trace/noop"

"github.com/apache/arrow/go/v16/arrow/ipc"
"github.com/apache/arrow/go/v16/arrow/util"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/oklog/ulid/v2"
"github.com/prometheus/client_golang/prometheus"
"go.opentelemetry.io/otel/trace"
"go.opentelemetry.io/otel/trace/noop"
"golang.org/x/exp/maps"
"golang.org/x/sync/errgroup"
"google.golang.org/protobuf/proto"
Expand Down
Loading
Loading