Skip to content

Commit 8a01a0b

Browse files
authored
[chore][exporter/clickhouse] Remove an unused function (#42811)
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description Removed the function `newPlaceholder` in the internal package as it seems no longer used. <!--Describe what testing was performed and which tests were added.--> #### Testing Unit & Integration tests
1 parent 50c2762 commit 8a01a0b

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

exporter/clickhouseexporter/internal/metrics/metrics_model.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"encoding/hex"
99
"errors"
1010
"fmt"
11-
"strings"
1211
"sync"
1312

1413
"github.com/ClickHouse/clickhouse-go/v2"
@@ -204,13 +203,3 @@ func convertValueAtQuantile(valueAtQuantile pmetric.SummaryDataPointValueAtQuant
204203
}
205204
return quantiles, values
206205
}
207-
208-
func newPlaceholder(count int) *string {
209-
var b strings.Builder
210-
for i := 0; i < count; i++ {
211-
b.WriteString(",?")
212-
}
213-
b.WriteString("),")
214-
placeholder := strings.Replace(b.String(), ",", "(", 1)
215-
return &placeholder
216-
}

exporter/clickhouseexporter/internal/metrics/metrics_model_test.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,11 +222,6 @@ func Test_getValue(t *testing.T) {
222222
})
223223
}
224224

225-
func Test_newPlaceholder(t *testing.T) {
226-
expectStr := "(?,?,?,?,?),"
227-
require.Equal(t, newPlaceholder(5), &expectStr)
228-
}
229-
230225
func Test_GetServiceName(t *testing.T) {
231226
t.Run("should return empty string on unset service.name", func(t *testing.T) {
232227
require.Empty(t, GetServiceName(pcommon.NewMap()))

0 commit comments

Comments
 (0)