Current distributed incremental runs will drop local production tables when the distributed tables are missing. This can cause irrevesable data loss.
The proposed fix will only drop and create local tables if they actually don't exist in clickhouse. Distributed tables will be created if they are missing (for any reason).
Checklist
Delete items not relevant to your PR:
[ ] Unit and integration tests covering the common scenarios were added
[x] A human-readable description of the changes was provided to include in CHANGELOG
Summary
Current distributed incremental runs will drop local production tables when the distributed tables are missing. This can cause irrevesable data loss.
The proposed fix will only drop and create local tables if they actually don't exist in clickhouse. Distributed tables will be created if they are missing (for any reason).
Checklist
Delete items not relevant to your PR: