public sealed class PartialResultSet : IMessage<PartialResultSet>, IEquatable<PartialResultSet>, IDeepCloneable<PartialResultSet>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Bigtable v2 API class PartialResultSet.
A partial result set from the streaming query API.
Cloud Bigtable clients buffer partial results received in this message until
a resume_token is received.
The pseudocode below describes how to buffer and parse a stream of
PartialResultSet messages.
Having:
queue of row results waiting to be returned queue
extensible buffer of bytes buffer
a place to keep track of the most recent resume_token
for each PartialResultSet p received {
if p.reset {
ensure queue is empty
ensure buffer is empty
}
if p.estimated_batch_size != 0 {
(optional) ensure buffer is sized to at least p.estimated_batch_size
}
if p.proto_rows_batch is set {
append p.proto_rows_batch.bytes to buffer
}
if p.batch_checksum is set and buffer is not empty {
validate the checksum matches the contents of buffer
(see comments on batch_checksum)
parse buffer as ProtoRows message, clearing buffer
add parsed rows to end of queue
}
if p.resume_token is set {
release results in queue
save p.resume_token in resume_token
}
}
CRC32C checksum of concatenated partial_rows data for the current batch.
When present, the buffered data from partial_rows forms a complete
parseable message of the appropriate type.
The client should mark the end of a parseable message and prepare to
receive a new one starting from the next PartialResultSet message.
Clients must verify the checksum of the serialized batch before yielding it
to the caller.
This does NOT mean the values can be yielded to the callers since a
resume_token is required to safely do so.
If resume_token is non-empty and any data has been received since the
last one, this field is guaranteed to be non-empty. In other words, clients
may assume that a batch will never cross a resume_token boundary.
Estimated size of the buffer required to hold the next batch of results.
This value will be sent with the first partial_rows of a batch. That is,
on the first partial_rows received in a stream, on the first message
after a batch_checksum message, and any time reset is true.
The client can use this estimate to allocate a buffer for the next batch of
results. This helps minimize the number of allocations required, though the
buffer size may still need to be increased if the estimate is too low.
An opaque token sent by the server to allow query resumption and signal
that the buffered values constructed from received partial_rows can be
yielded to the caller. Clients can provide this token in a subsequent
request to resume the result stream from the current point.
When resume_token is non-empty, the buffered values received from
partial_rows since the last non-empty resume_token can be yielded to
the callers, provided that the client keeps the value of resume_token and
uses it on subsequent retries.
A resume_token may be sent without information in partial_rows to
checkpoint the progress of a sparse query. Any previous partial_rows data
should still be yielded in this case, and the new resume_token should be
saved for future retries as normal.
A resume_token will only be sent on a boundary where there is either no
ongoing result batch, or batch_checksum is also populated.
The server will also send a sentinel resume_token when last batch of
partial_rows is sent. If the client retries the ExecuteQueryRequest with
the sentinel resume_token, the server will emit it again without any
data in partial_rows, then return OK.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-12 UTC."],[[["\u003cp\u003eThe latest version of the Google.Cloud.Bigtable.V2 API is 3.17.0, with documentation available at the provided link, and several prior versions are available for reference.\u003c/p\u003e\n"],["\u003cp\u003eThe PartialResultSet class represents a partial result set from the streaming query API, requiring clients to buffer partial results until a resume_token is received.\u003c/p\u003e\n"],["\u003cp\u003eClients need to validate the BatchChecksum, which is a CRC32C checksum of concatenated partial_rows data, before yielding the data to the caller, and this does not mean that the value can be yielded without a resume_token.\u003c/p\u003e\n"],["\u003cp\u003eThe EstimatedBatchSize property provides an estimate of the buffer size required for the next batch of results, aiding in efficient buffer allocation.\u003c/p\u003e\n"],["\u003cp\u003eThe ResumeToken property is used for query resumption, signaling that buffered values can be yielded and allowing clients to resume the result stream from the current point in subsequent requests.\u003c/p\u003e\n"]]],[],null,["# Google Bigtable v2 API - Class PartialResultSet (3.23.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.23.0 (latest)](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/latest/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.22.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.22.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.21.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.21.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.20.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.20.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.19.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.19.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.18.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.18.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.17.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.17.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.16.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.16.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.15.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.15.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.14.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.14.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.13.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.13.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.12.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.12.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.11.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.10.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.9.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.8.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.7.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.6.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.5.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.4.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.3.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.2.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.1.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/3.0.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [2.6.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/2.6.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/2.5.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/2.4.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/2.3.0/Google.Cloud.Bigtable.V2.PartialResultSet)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/2.2.0/Google.Cloud.Bigtable.V2.PartialResultSet) \n\n public sealed class PartialResultSet : IMessage\u003cPartialResultSet\u003e, IEquatable\u003cPartialResultSet\u003e, IDeepCloneable\u003cPartialResultSet\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Bigtable v2 API class PartialResultSet.\n\nA partial result set from the streaming query API.\nCloud Bigtable clients buffer partial results received in this message until\na `resume_token` is received.\n\nThe pseudocode below describes how to buffer and parse a stream of\n`PartialResultSet` messages.\n\nHaving:\n\n- queue of row results waiting to be returned `queue`\n- extensible buffer of bytes `buffer`\n- a place to keep track of the most recent `resume_token` for each PartialResultSet `p` received { if p.reset { ensure `queue` is empty ensure `buffer` is empty } if p.estimated_batch_size != 0 { (optional) ensure `buffer` is sized to at least `p.estimated_batch_size` } if `p.proto_rows_batch` is set { append `p.proto_rows_batch.bytes` to `buffer` } if p.batch_checksum is set and `buffer` is not empty { validate the checksum matches the contents of `buffer` (see comments on `batch_checksum`) parse `buffer` as `ProtoRows` message, clearing `buffer` add parsed rows to end of `queue` } if p.resume_token is set { release results in `queue` save `p.resume_token` in `resume_token` } } \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e PartialResultSet \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[PartialResultSet](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/latest/Google.Cloud.Bigtable.V2.PartialResultSet), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[PartialResultSet](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/latest/Google.Cloud.Bigtable.V2.PartialResultSet), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[PartialResultSet](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/latest/Google.Cloud.Bigtable.V2.PartialResultSet), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Bigtable.V2](/dotnet/docs/reference/Google.Cloud.Bigtable.V2/latest/Google.Cloud.Bigtable.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.Bigtable.V2.dll\n\nConstructors\n------------\n\n### PartialResultSet()\n\n public PartialResultSet()\n\n### PartialResultSet(PartialResultSet)\n\n public PartialResultSet(PartialResultSet other)\n\nProperties\n----------\n\n### BatchChecksum\n\n public uint BatchChecksum { get; set; }\n\nCRC32C checksum of concatenated `partial_rows` data for the current batch.\n\nWhen present, the buffered data from `partial_rows` forms a complete\nparseable message of the appropriate type.\n\nThe client should mark the end of a parseable message and prepare to\nreceive a new one starting from the next `PartialResultSet` message.\nClients must verify the checksum of the serialized batch before yielding it\nto the caller.\n\nThis does NOT mean the values can be yielded to the callers since a\n`resume_token` is required to safely do so.\n\nIf `resume_token` is non-empty and any data has been received since the\nlast one, this field is guaranteed to be non-empty. In other words, clients\nmay assume that a batch will never cross a `resume_token` boundary.\n\n### EstimatedBatchSize\n\n public int EstimatedBatchSize { get; set; }\n\nEstimated size of the buffer required to hold the next batch of results.\n\nThis value will be sent with the first `partial_rows` of a batch. That is,\non the first `partial_rows` received in a stream, on the first message\nafter a `batch_checksum` message, and any time `reset` is true.\n\nThe client can use this estimate to allocate a buffer for the next batch of\nresults. This helps minimize the number of allocations required, though the\nbuffer size may still need to be increased if the estimate is too low.\n\n### HasBatchChecksum\n\n public bool HasBatchChecksum { get; }\n\nGets whether the \"batch_checksum\" field is set\n\n### PartialRowsCase\n\n public PartialResultSet.PartialRowsOneofCase PartialRowsCase { get; }\n\n### ProtoRowsBatch\n\n public ProtoRowsBatch ProtoRowsBatch { get; set; }\n\nPartial rows in serialized ProtoRows format.\n\n### Reset\n\n public bool Reset { get; set; }\n\nIf `true`, any data buffered since the last non-empty `resume_token` must\nbe discarded before the other parts of this message, if any, are handled.\n\n### ResumeToken\n\n public ByteString ResumeToken { get; set; }\n\nAn opaque token sent by the server to allow query resumption and signal\nthat the buffered values constructed from received `partial_rows` can be\nyielded to the caller. Clients can provide this token in a subsequent\nrequest to resume the result stream from the current point.\n\nWhen `resume_token` is non-empty, the buffered values received from\n`partial_rows` since the last non-empty `resume_token` can be yielded to\nthe callers, provided that the client keeps the value of `resume_token` and\nuses it on subsequent retries.\n\nA `resume_token` may be sent without information in `partial_rows` to\ncheckpoint the progress of a sparse query. Any previous `partial_rows` data\nshould still be yielded in this case, and the new `resume_token` should be\nsaved for future retries as normal.\n\nA `resume_token` will only be sent on a boundary where there is either no\nongoing result batch, or `batch_checksum` is also populated.\n\nThe server will also send a sentinel `resume_token` when last batch of\n`partial_rows` is sent. If the client retries the ExecuteQueryRequest with\nthe sentinel `resume_token`, the server will emit it again without any\ndata in `partial_rows`, then return OK."]]