Skip to content

Commit ddc7c16

Browse files
committed
fail if selectedColumns == ""
1 parent 343c0ef commit ddc7c16

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

flow/connectors/mysql/qrep.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,10 @@ func (c *MySqlConnector) PullQRepRecords(
277277
}
278278

279279
selectedColumns := buildSelectedColumns(tableSchema.Columns, config.Exclude)
280+
if selectedColumns == "" {
281+
return 0, 0, fmt.Errorf("no columns selected for watermark table %s (check Exclude configuration)", config.WatermarkTable)
282+
}
283+
280284
parsedSrcTable, err := common.ParseTableIdentifier(config.WatermarkTable)
281285
if err != nil {
282286
c.logger.Error("unable to parse source table", slog.Any("error", err))

flow/e2e/clickhouse_mysql_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2460,9 +2460,6 @@ func (s ClickHouseSuite) Test_MySQL_GIPK_Consistency() {
24602460
srcFullName := s.attachSchemaSuffix(srcTableName)
24612461
dstTableName := "test_my_gipk_dst"
24622462

2463-
// GIPK is controlled by a session variable; the connector holds a single persistent connection,
2464-
// so the setting sticks for the subsequent CREATE. Reset it afterwards to avoid leaking into
2465-
// other tables in the suite.
24662463
require.NoError(s.t, s.source.Exec(s.t.Context(), `SET SESSION sql_generate_invisible_primary_key = ON`))
24672464
require.NoError(s.t, s.source.Exec(s.t.Context(), fmt.Sprintf(`
24682465
CREATE TABLE IF NOT EXISTS %s (

0 commit comments

Comments
 (0)