You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$CLICKHOUSE_CLIENT --query "INSERT INTO customer_dbt_materialize SELECT number FROM numbers(1000)"
19
+
20
+
# NOTE This command looks like noop (pure metadata change which we will override with next ALTER), however it leads to important logic in the codebase:
21
+
# When we apply MODIFY COLUMN we validate that we changed something in PHYSICAL column. If we don't change anything in PHYSICAL column, we will not touch any data parts.
22
+
#
23
+
# After this MODIFY `value` column is not a physical column anymore, however it still exists in data part. So the next ALTER MODIFY COLUMN to MATERIALIZED state
24
+
# will also do nothing with data parts (because `value` is ALIAS, not PHYSICAL column).
25
+
#
26
+
# And the last MATERIALIZE COLUMN will trigger real mutation which will rewrite data part and leave incorrect checksum on disk.
27
+
$CLICKHOUSE_CLIENT --query "ALTER TABLE customer_dbt_materialize MODIFY COLUMN value Array(Tuple(transaction_hash String, instruction_sig_hash String)) ALIAS array((toString(key), toString(key))) SETTINGS mutations_sync = 2"
0 commit comments