Skip to content

Commit 02c9c20

Browse files
quote watermark column with non-zero NumPartitionsOverride (#3618)
Fix an issue of using PostgreSQL watermark column that contain uppercase letters for example ``` "watermarkColumn": "rowInsertedAt", ``` and setting snapshotNumPartitionsOverride > 0, **GetQRepPartitions** fails with ``` { "message": "failed to get partitions from source: ERROR: column \"rowinsertedat\" does not exist (SQLSTATE 42703)", "source": "GoSDK", "cause": { "message": "ERROR: column \"rowinsertedat\" does not exist (SQLSTATE 42703)", "source": "GoSDK", "applicationFailureInfo": { "type": "PgError" } }, "applicationFailureInfo": { "type": "wrapError" } } ```
1 parent 16cad47 commit 02c9c20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flow/connectors/postgres/qrep.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ func (c *PostgresConnector) getNumRowsPartitions(
265265
return partitionHelper.GetPartitions(), nil
266266
} else {
267267
minmaxQuery := fmt.Sprintf("SELECT MIN(%[2]s),MAX(%[2]s) FROM %[1]s %[3]s",
268-
parsedWatermarkTable.String(), config.WatermarkColumn, whereClause)
268+
parsedWatermarkTable.String(), quotedWatermarkColumn, whereClause)
269269
var row pgx.Row
270270
var minVal any
271271
if last != nil && last.Range != nil {

0 commit comments

Comments
 (0)