From 8f962657c80158045e049648b73ac455a5339d75 Mon Sep 17 00:00:00 2001 From: Anshul Khandelwal <12948312+k-anshul@users.noreply.github.com> Date: Wed, 16 Oct 2024 14:16:09 +0530 Subject: [PATCH] Fix space in table name while droping view (#5916) --- runtime/drivers/duckdb/olap.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/drivers/duckdb/olap.go b/runtime/drivers/duckdb/olap.go index ac8afd73a42..df0ddfd5b5e 100644 --- a/runtime/drivers/duckdb/olap.go +++ b/runtime/drivers/duckdb/olap.go @@ -727,7 +727,7 @@ func (c *connection) dropAndReplace(ctx context.Context, oldName, newName string existingTyp = "TABLE" } - err := c.Exec(ctx, &drivers.Statement{Query: fmt.Sprintf("DROP %s IF EXISTS %s", existingTyp, newName)}) + err := c.Exec(ctx, &drivers.Statement{Query: fmt.Sprintf("DROP %s IF EXISTS %s", existingTyp, safeSQLName(newName))}) if err != nil { return err }