From 3fa6b8926264a95d89c437114ee1a7b30cd8463f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Tue, 10 Dec 2024 19:32:39 +0000 Subject: [PATCH] do not revert --- flow/e2e/clickhouse/clickhouse.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/flow/e2e/clickhouse/clickhouse.go b/flow/e2e/clickhouse/clickhouse.go index 2b8241f40..ebf18db6b 100644 --- a/flow/e2e/clickhouse/clickhouse.go +++ b/flow/e2e/clickhouse/clickhouse.go @@ -3,7 +3,6 @@ package e2e_clickhouse import ( "context" "encoding/binary" - "errors" "fmt" "math/big" "strconv" @@ -185,15 +184,10 @@ func (s ClickHouseSuite) GetRows(table string, cols string) (*model.QRecordBatch } defer ch.Close() - firstCol, _, _ := strings.Cut(cols, ",") - if firstCol == "" { - return nil, errors.New("no columns specified") - } batch := &model.QRecordBatch{} var schema chproto.Results if err := ch.Do(context.Background(), chgo.Query{ - Body: fmt.Sprintf(`SELECT %s FROM %s FINAL WHERE _peerdb_is_deleted = 0 ORDER BY %s SETTINGS use_query_cache = false`, - cols, table, firstCol), + Body: fmt.Sprintf(`SELECT %s FROM %s FINAL WHERE _peerdb_is_deleted = 0 ORDER BY 1 SETTINGS use_query_cache = false`, cols, table), Result: schema.Auto(), OnResult: func(ctx context.Context, block chproto.Block) error { if len(batch.Schema.Fields) == 0 {