mirror of
https://github.com/valitydev/clickhouse-sink-connector.git
synced 2024-11-06 18:45:27 +00:00
Fixed logic of before/after struct. Added view as a separate table to avoid stack size exception(TOO_MUCH_RECURSION) in ClickHouse.
This commit is contained in:
parent
de7f50e14f
commit
879d998517
@ -102,5 +102,14 @@ CREATE TABLE topic_offset_metadata(
|
||||
ENGINE = MergeTree
|
||||
PRIMARY KEY _topic;
|
||||
|
||||
CREATE MATERIALIZED VIEW mv_topic_offset_metadata_view to topic_offset_metadata
|
||||
CREATE TABLE topic_offset_metadata_view
|
||||
(
|
||||
`_topic` String,
|
||||
`_partition` UInt64,
|
||||
`_offset` UInt64
|
||||
) Engine=MergeTree
|
||||
PRIMARY KEY _topic;
|
||||
|
||||
|
||||
CREATE MATERIALIZED VIEW mv_topic_offset_metadata_view to topic_offset_metadata_view
|
||||
AS select _topic, _partition, MAX(_offset) as _offset from topic_offset_metadata tom group by _topic, _partition;
|
@ -105,8 +105,9 @@ public class ClickHouseStruct {
|
||||
if(key != null) {
|
||||
this.key = key.toString();
|
||||
}
|
||||
this.beforeStruct = beforeStruct;
|
||||
this.afterStruct = afterStruct;
|
||||
setBeforeStruct(beforeStruct);
|
||||
setAfterStruct(afterStruct);
|
||||
|
||||
this.setAdditionalMetaData(metadata);
|
||||
this.cdcOperation = operation;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user