Repository navigation
Conversation
…oogleCloudPlatform#1835) Signed-off-by: reginaldalfret <[email protected]>
nj1973
self-requested a review
October 26, 2026 12:49
nj1973
requested changes
Oct 26, 2026
nj1973
left a comment
Collaborator
There was a problem hiding this comment.
Thanks for the contribution, I think we just need a tweak.
Also, remember to run black on your code using the version specified in nox.py.
Signed-off-by: reginaldalfret <[email protected]>
Contributor
Author
|
@nj1973 Thanks for the feedback! I have updated the implementation:
|
Collaborator
|
/gcbrun |
… size capping Update SQL Server section in limitations.md to state that random row batch size is automatically capped to avoid exceeding the 2,100 query parameter limit, and that the effective batch size is reflected in validation results. Also add boundary and disabled-state unit tests for ConfigManager random row batch size. Signed-off-by: reginaldalfret <[email protected]>
Contributor
Author
|
@nj1973 I have updated \docs/limitations.md\ as requested to document the automatic behavior:
Additionally, added boundary and disabled-state unit tests in \ ests/unit/test_config_manager.py\ and formatted with \�lack==26.5.1\ per |
Collaborator
|
/gcbrun |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
When validating tables with random-row filter against SQL Server (either as source or target),
random_row_batch_sizedefault or configured values (e.g. 10000) cause SQL Server queries to fail withpyodbc.Error(SQLSTATE 07002 / parameter limit) or similar driver errors because SQL Server has a maximum parameter limit of 2,100 bound parameters per query.This change:
source_client.name == "mssql"ortarget_client.name == "mssql".max(1, 2000 // len(source_pk_columns))to account for composite primary keys while staying strictly below the 2,100 parameter limit.random_row_batch_sizeto that safe limit if the configured batch size exceeds it, and issues an informative warning log.tests/unit/test_data_validation.pyfor both single and composite primary keys with MSSQL source/target.Issues to be closed
Closes #1835
Checklist
CONTRIBUTINGGuide.tests/local_check.shscript)