orchestrator/clickhouse: add compatibility check for INTERPOLATE issue

I don't want to keep disabling the experimental analyzer forever. The
version check could be turned into disabling the experimental analyzer,
but this is better to push people to update their versions.

To be pushed only when 24.3 (LTS) and 24.4 gets the fix.
This commit is contained in:
Vincent Bernat
2024-06-02 14:21:49 +02:00
parent cffd6e42ab
commit 625429f27f
5 changed files with 51 additions and 28 deletions

View File

@@ -10,7 +10,6 @@ import (
"strings"
"time"
"github.com/ClickHouse/clickhouse-go/v2"
"github.com/gin-gonic/gin"
"akvorado/common/schema"
@@ -243,9 +242,6 @@ ORDER BY Time WITH FILL
Time time.Time `json:"t"`
Gbps float64 `json:"gbps"`
}{}
ctx = clickhouse.Context(ctx, clickhouse.WithSettings(clickhouse.Settings{
"allow_experimental_analyzer": 0,
}))
err := c.d.ClickHouseDB.Conn.Select(ctx, &results, strings.TrimSpace(query))
if err != nil {
c.r.Err(err).Msg("unable to query database")