Skip to content

Commit

Permalink
Clickhouse: remove gettableschema step in cdc (#1760)
Browse files Browse the repository at this point in the history
This function call is not actually used downstream and is an unnecessary
call to clickhouse
  • Loading branch information
Amogh-Bharadwaj authored May 27, 2024
1 parent df919c2 commit 2ac6aff
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
7 changes: 1 addition & 6 deletions flow/connectors/clickhouse/cdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,7 @@ func (c *ClickhouseConnector) syncRecordsViaAvro(
DestinationTableIdentifier: strings.ToLower(rawTableIdentifier),
}
avroSyncer := NewClickhouseAvroSyncMethod(qrepConfig, c)
destinationTableSchema, err := c.getTableSchema(qrepConfig.DestinationTableIdentifier)
if err != nil {
return nil, err
}

numRecords, err := avroSyncer.SyncRecords(ctx, destinationTableSchema, stream, req.FlowJobName)
numRecords, err := avroSyncer.SyncRecords(ctx, stream, req.FlowJobName)
if err != nil {
return nil, err
}
Expand Down
1 change: 0 additions & 1 deletion flow/connectors/clickhouse/qrep_avro_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ func (s *ClickhouseAvroSyncMethod) CopyStageToDestination(ctx context.Context, a

func (s *ClickhouseAvroSyncMethod) SyncRecords(
ctx context.Context,
dstTableSchema []*sql.ColumnType,
stream *model.QRecordStream,
flowJobName string,
) (int, error) {
Expand Down

0 comments on commit 2ac6aff

Please sign in to comment.