Closed sketchmind closed 2 years ago
Which your clickhouse-server version? Are you using Atomic Database Engine?
Which your clickhouse-server version? Are you using Atomic Database Engine?
Version is 21.3.7.62 (official build) and it's the engine
It's because the async DROP TABLE
does not take effect immediately, then breaks createOrReplace
. I think it's good to add a configuration spark.clickhouse.drop.table.sync
and set it to true
in default, because atomic
is the default database engine in recent ClickHouse releases.
I set this property but it didn't solve the problem,I'm guessing the problem is caused by not using the on cluster statement when deleting the table during the replacement process
You are right, the project does not handle all cases for clusterClause properly.
Using createOrReplace method in Spark DataSourceV2, when the table created on cluster, replace will failed with 'Table xxx(other node of cluster) already exists'.