1
0
mirror of synced 2026-01-08 12:03:02 -05:00

Fix bug with getStateEmissionFrequency() settings (#26974)

An order by query should NOT be issued when the connector does not emit intermediate state
This commit is contained in:
Akash Kulkarni
2023-06-02 12:52:05 -07:00
committed by GitHub
parent 6f2cdf4c26
commit fcc39ea2e4

View File

@@ -110,9 +110,9 @@ public abstract class AbstractJdbcSource<Datatype> extends AbstractDbSource<Data
final SyncMode syncMode,
final Optional<String> cursorField) {
LOGGER.info("Queueing query for table: {}", tableName);
// This corresponds to the initial sync for in INCREMENTAL_MODE. The ordering of the records matters
// as intermediate state messages are emitted.
if (syncMode.equals(SyncMode.INCREMENTAL)) {
// This corresponds to the initial sync for in INCREMENTAL_MODE, where the ordering of the records matters
// as intermediate state messages are emitted (if the connector emits intermediate state).
if (syncMode.equals(SyncMode.INCREMENTAL) && getStateEmissionFrequency() > 0) {
final String quotedCursorField = enquoteIdentifier(cursorField.get(), getQuoteString());
return queryTable(database, String.format("SELECT %s FROM %s ORDER BY %s ASC",
enquoteIdentifierList(columnNames, getQuoteString()),