Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Validation with 0 rows in response #354

Open
illia-li opened this issue Jun 12, 2023 · 0 comments
Open

Validation with 0 rows in response #354

illia-li opened this issue Jun 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@illia-li
Copy link
Contributor

illia-li commented Jun 12, 2023

In 'Check' function have no difference processing with cases then in response 0 rows or some rows:

func (ds delegatingStore) Check(ctx context.Context, table *typedef.Table, builder qb.Builder, values ...interface{}) error {
	testRows, err := load(ctx, ds.testStore, builder, values)
...
	oracleRows, err := load(ctx, ds.oracleStore, builder, values)
...
	if len(testRows) != len(oracleRows) {
...
	}

I was build in 'Check' function atomic counter for responses with 0 rows :

	if len(testRows) == 0 && len(oracleRows) == 0 {
		utils.NilRows.Add(1)
	}

And run usual test. Results:
Write Operations: 135611
Read Operations: 129290
Nil Rows Counter: 116810

Then I ran a test for each function from GenCheckStmt. Here are the results for each of them:

genSinglePartitionQuery:
Write Operations: 183150
Read Operations: 156343
Nil Rows Counter: 31010

genMultiplePartitionQuery:
Write Operations: 158734
Read Operations: 154572
Nil Rows Counter: 154572

genClusteringRangeQuery:
Write Operations: 165392
Read Operations: 174523
Nil Rows Counter: 167365

genMultiplePartitionClusteringRangeQuery:
Write Operations: 170090
Read Operations: 169189
Nil Rows Counter: 158099

genSingleIndexQuery:
Write Operations: 87691
Read Operations: 5870
Read Errors : 241
Nil Rows Counter: 5870

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants