Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit 661bc95

Browse files
committed
Regression fix
1 parent 45484a1 commit 661bc95

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

platform/ingest/ast.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (ct CreateTableStatement) ToSQL() string {
5353
var b strings.Builder
5454

5555
if ct.Cluster != "" {
56-
b.WriteString(fmt.Sprintf(`CREATE TABLE IF NOT EXISTS "%s" ON CLUSTER "%s"`+" \n(\n\n", ct.Name, ct.Cluster))
56+
b.WriteString(fmt.Sprintf(`CREATE TABLE IF NOT EXISTS "%s" ON CLUSTER "%s"`+" \n", ct.Name, ct.Cluster))
5757
} else {
5858
b.WriteString(fmt.Sprintf(`CREATE TABLE IF NOT EXISTS "%s"`, ct.Name))
5959
}

platform/ingest/processor.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,6 +991,9 @@ func (ip *IngestProcessor) executeStatements(ctx context.Context, queries []stri
991991

992992
err := ip.execute(ctx, q)
993993
if err != nil {
994+
if strings.Contains(q, "CREATE") { // always log table creation failures
995+
logger.Error().Err(err).Msgf("Error executing DDL: %s", q)
996+
}
994997
count := ip.errorLogCounter.Add(1)
995998

996999
// Limit the number of error logs to avoid flooding the logs.

0 commit comments

Comments
 (0)