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.
Connected to #335
Checkstyle
I couldn't find any checkstyle in projects and use default idea checkstyle.
Please give a link if you have one.
Solution
Try to make codestyle like in go ydb-platform/ydb-go-sdk#1519
ExecuteQuerySettings finally looks like
QuerySession doesn't changed and looks like this
Doubts
Take a look at TableClientImpl method executeDataQueryInternal code
In this code ExecuteQuerySettings don't use withResourcePool at all.
May be add withResourcePool in ExecuteDataQuerySettings?
Test
Also write some integration test.
All tests connected to Resource Pool I carried out in another class QueryIntegrationResourcePoolTest
For me it's better have different class for some features than have one big class with all test connected to Query.
Each feature needs some additional objects and checks specified for the feature but not the whole tests.
Some test problems
Problem with feature
In "ydbplatform/local-ydb:latest" you have to enable in tech.ydb.test.integration.YdbEnvironment
dockerFeatures = createParam("YDB_DOCKER_FEATURE_FLAGS", "enable_resource_pools"); to run test with pool
More detail I write in QueryIntegrationResourcePoolTest
I divide the test into 2 groups.
The first one passes, ignoring enable_resource_pools.
The second one runs only with enable_resource_pools -> I marked it as ignored. This annotation may be removed after the resource pool is enabled and removed from the experimental feature.
Test depending on feature
Some test give results depending on the enabled/disabled feature enable_resource_pools.
Take a look at QueryIntegrationResourcePoolTest.selectShouldFailWithUnknownResourcePollTest
When enable_resource_pools = true
select with unknown pool failed
When enable_resource_pools = false
select with unknown pool doesn't failed
I marked it as Ignore and will be enabled after enable_resource_pools = true
Some thoughts
Maybe just wait when the resource pool is removed from the experimental feature and becomes available in "ydbplatform/local-ydb:latest." after that merged in master. Then we can easily remove the annotation Ignore. Your repository, your call.
Ydb Image tested
24.3.11.13
24.4
24.4.4
24.5.1
Java tested
Java openjdk 21
Java openjdk 11