You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This spawned from a discussion with Carlos at Stitch. I believe there may be an off-by-one error with the CHANGE_TRACKING_CURRENT_VERSION being passed into SQL Server's CHANGETABLE function. The SQL Server documentation recommends directly passing the version number retrieved by CHANGE_TRACKING_CURRENT_VERSION() into the CHANGETABLE function: https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/work-with-change-tracking-sql-server?view=sql-server-2017 . If this version number is passed as-is, tables with no new updates should return zero rows (at least, I believe this is what SQL Server documentation says).
But the implementation shown in line 166 above decrements the retrieved number by one. This results in lots of duplicated copying of data, and seems to disagree with the SQL Server documentation.
Is there a reason for the decrement-by-one behavior?
The text was updated successfully, but these errors were encountered:
tap-mssql/src/tap_mssql/sync_strategies/logical.clj
Line 166 in 81cce9b
This spawned from a discussion with Carlos at Stitch. I believe there may be an off-by-one error with the CHANGE_TRACKING_CURRENT_VERSION being passed into SQL Server's CHANGETABLE function. The SQL Server documentation recommends directly passing the version number retrieved by CHANGE_TRACKING_CURRENT_VERSION() into the CHANGETABLE function: https://docs.microsoft.com/en-us/sql/relational-databases/track-changes/work-with-change-tracking-sql-server?view=sql-server-2017 . If this version number is passed as-is, tables with no new updates should return zero rows (at least, I believe this is what SQL Server documentation says).
But the implementation shown in line 166 above decrements the retrieved number by one. This results in lots of duplicated copying of data, and seems to disagree with the SQL Server documentation.
Is there a reason for the decrement-by-one behavior?
The text was updated successfully, but these errors were encountered: