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 25, 2024
1 parent 336ff4d commit 67abc5a
Showing 1 changed file with 1 addition and 1 deletion.
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(%' type NOT LIKE 'Nullable(Enum%(%' AND type NOT LIKE 'Nullable(Tuple(%' AND type NOT LIKE 'Array(Tuple(%' AND type NOT LIKE 'Nullable(Array(Tuple(%' " +
"WHERE active AND database=? AND table=? AND type NOT LIKE 'Enum%(%' AND type NOT LIKE 'Tuple(%' AND 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 67abc5a

Please sign in to comment.