Skip to content

Commit

Permalink
fix Nullable(Enum()) types corner case for `check_parts_columns: tr…
Browse files Browse the repository at this point in the history
…ue`, fix #1033
  • Loading branch information
Slach committed Oct 24, 2024
1 parent 5d577f7 commit 336ff4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ BUG FIXES
- fix `TestLongListRemote` for properly time measurement
- fix log_pointer handle from system.replicas during restore, fix [967](https://github.com/Altinity/clickhouse-backup/issues/967)
- fix `use_embedded_backup_restore: true` behavior for azblob, fix [1031](https://github.com/Altinity/clickhouse-backup/issues/1031)
- fix `Nullable(Enum())` types corner case for `check_parts_columns: true`, fix [1033](https://github.com/Altinity/clickhouse-backup/issues/1033)

# v2.6.2
BUG FIXES
Expand Down
2 changes: 1 addition & 1 deletion pkg/clickhouse/clickhouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ func (ch *ClickHouse) CheckSystemPartsColumns(ctx context.Context, table *Table)
partColumnsDataTypes := make([]ColumnDataTypes, 0)
partsColumnsSQL := "SELECT column, groupUniqArray(type) AS uniq_types " +
"FROM system.parts_columns " +
"WHERE active AND database=? AND table=? AND type NOT LIKE 'Enum%(%' AND type NOT LIKE 'Tuple(%' AND type NOT LIKE 'Array(Tuple(%' " +
"WHERE active AND database=? AND table=? AND type NOT LIKE 'Enum%(%' AND type NOT LIKE 'Tuple(%' type NOT LIKE 'Nullable(Enum%(%' AND type NOT LIKE 'Nullable(Tuple(%' AND type NOT LIKE 'Array(Tuple(%' AND type NOT LIKE 'Nullable(Array(Tuple(%' " +
"GROUP BY column HAVING length(uniq_types) > 1"
if err = ch.SelectContext(ctx, &partColumnsDataTypes, partsColumnsSQL, table.Database, table.Name); err != nil {
return err
Expand Down

0 comments on commit 336ff4d

Please sign in to comment.