Skip to content

Commit

Permalink
fix query error on cluster name with space and hyphen (#6426)
Browse files Browse the repository at this point in the history
  • Loading branch information
k-anshul committed Jan 17, 2025
1 parent 25f89f9 commit 3da1d9a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/drivers/clickhouse/information_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func (i informationSchema) entityType(ctx context.Context, db, name string) (typ
q = `SELECT
multiIf(engine IN ('MaterializedView', 'View'), 'VIEW', engine = 'Dictionary', 'DICTIONARY', 'TABLE') AS type,
countDistinct(_shard_num) > 1 AS is_on_cluster
FROM clusterAllReplicas(` + i.c.config.Cluster + `, system.tables) AS t
FROM clusterAllReplicas(` + safeSQLName(i.c.config.Cluster) + `, system.tables) AS t
JOIN system.databases AS db ON t.database = db.name
WHERE t.database = coalesce(?, currentDatabase()) AND t.name = ?
GROUP BY engine, t.name`
Expand Down

2 comments on commit 3da1d9a

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://ui.rilldata.com as production
🚀 Deployed on https://678a37d926b2394baa894996--rill-ui.netlify.app

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.