Skip to content

feat: Support result set size limit for QueryService-based TableClient #533

Description

@nvamelichev

Currently the QueryService-based TableClient always returns false from DataQueryResult.isTruncated() (https://github.com/ydb-platform/ydb-java-sdk/blob/master/query/src/main/java/tech/ydb/query/impl/TableClientImpl.java#L118).

And to prevent from reading way too much data, the users now have to always remember to set a LIMIT in their queries, which is hard.

I suggest to add an explicit "row limit" setting on TableClient.Builder, which will enforce an application-dependent max ResultSet size => users will get DataQueryResult.isTruncated() == true when that limit is exceeded. Also, with an explicit setting, the QueryService-based TableClient can also stop streaming the result set data as soon as it reaches the limit, preventing resource waste.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions