Skip to content

Commit

Permalink
fix: logic table not sync schema
Browse files Browse the repository at this point in the history
  • Loading branch information
YenchangChan committed Mar 21, 2024
1 parent ae35ab4 commit 63d97f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions output/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,8 @@ func (c *ClickHouse) getDistTbls(table string) (distTbls []DistTblInfo, err erro
return
}
query := fmt.Sprintf(`SELECT name, (extractAllGroups(engine_full, '(Distributed\\(\')(.*)\',\\s+\'(.*)\',\\s+\'(.*)\'(.*)')[1])[2] AS cluster
FROM system.tables WHERE engine='Distributed' AND database='%s' AND match(engine_full, 'Distributed\(\'%s\', \'%s\', \'%s\'.*\)')`,
c.dbName, c.cfg.Clickhouse.Cluster, c.dbName, table)
FROM system.tables WHERE engine='Distributed' AND database='%s' AND match(engine_full, 'Distributed\(\'.*\', \'%s\', \'%s\'.*\)')`,
c.dbName, c.dbName, table)
util.Logger.Info(fmt.Sprintf("executing sql=> %s", query), zap.String("task", taskCfg.Name))
var rows *pool.Rows
if rows, err = conn.Query(query); err != nil {
Expand Down

0 comments on commit 63d97f4

Please sign in to comment.