The ReadPartition class is a regular type that represents a single slice of a parallel Read operation.
Instances of ReadPartition are created by Client::PartitionRead. Once created, ReadPartition objects can be serialized, transmitted to separate processes, and used to read data in parallel using Client::Read. If data_boost is set, those requests will be executed using the independent compute resources of Cloud Spanner Data Boost.
Constructors
ReadPartition(ReadPartition const &)
Copy and move.
Parameter
Name
Description
ReadPartition const &
ReadPartition(ReadPartition &&)
Copy and move.
Parameter
Name
Description
ReadPartition &&
ReadPartition()
Constructs an instance of ReadPartition that does not specify any table or columns to be read.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["\u003cp\u003eThe latest version available for the \u003ccode\u003eReadPartition\u003c/code\u003e class is 2.37.0-rc, with numerous previous versions also documented for reference.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eReadPartition\u003c/code\u003e represents a single segment of a parallel read operation in Google Cloud Spanner, and it's created by using \u003ccode\u003eClient::PartitionRead\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eReadPartition\u003c/code\u003e objects can be moved across different processes, allowing for the parallel reading of data using \u003ccode\u003eClient::Read\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eReadPartition\u003c/code\u003e class includes constructors and operators that support copy and move operations, plus a constructor that creates a \u003ccode\u003eReadPartition\u003c/code\u003e instance with no specified table or columns to be read.\u003c/p\u003e\n"],["\u003cp\u003eThe class also contains functions such as \u003ccode\u003eTableName()\u003c/code\u003e, \u003ccode\u003eColumnNames()\u003c/code\u003e and \u003ccode\u003eReadOptions()\u003c/code\u003e that allows you to receive more information on the \u003ccode\u003eReadPartition\u003c/code\u003e class.\u003c/p\u003e\n"]]],[],null,["# Class ReadPartition (2.42.0-rc)\n\nVersion latestkeyboard_arrow_down\n\n- [2.42.0-rc (latest)](/cpp/docs/reference/spanner/latest/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.41.0](/cpp/docs/reference/spanner/2.41.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.40.0](/cpp/docs/reference/spanner/2.40.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.39.0](/cpp/docs/reference/spanner/2.39.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.38.0](/cpp/docs/reference/spanner/2.38.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.37.0](/cpp/docs/reference/spanner/2.37.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.36.0](/cpp/docs/reference/spanner/2.36.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.35.0](/cpp/docs/reference/spanner/2.35.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.34.0](/cpp/docs/reference/spanner/2.34.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.33.0](/cpp/docs/reference/spanner/2.33.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.32.0](/cpp/docs/reference/spanner/2.32.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.31.0](/cpp/docs/reference/spanner/2.31.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.30.0](/cpp/docs/reference/spanner/2.30.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.29.0](/cpp/docs/reference/spanner/2.29.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.28.0](/cpp/docs/reference/spanner/2.28.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.27.0](/cpp/docs/reference/spanner/2.27.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.26.0](/cpp/docs/reference/spanner/2.26.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.25.1](/cpp/docs/reference/spanner/2.25.1/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.24.0](/cpp/docs/reference/spanner/2.24.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.23.0](/cpp/docs/reference/spanner/2.23.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.22.1](/cpp/docs/reference/spanner/2.22.1/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.21.0](/cpp/docs/reference/spanner/2.21.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.20.0](/cpp/docs/reference/spanner/2.20.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.19.0](/cpp/docs/reference/spanner/2.19.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.18.0](/cpp/docs/reference/spanner/2.18.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.17.0](/cpp/docs/reference/spanner/2.17.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.16.0](/cpp/docs/reference/spanner/2.16.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.15.1](/cpp/docs/reference/spanner/2.15.1/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.14.0](/cpp/docs/reference/spanner/2.14.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.13.0](/cpp/docs/reference/spanner/2.13.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.12.0](/cpp/docs/reference/spanner/2.12.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition)\n- [2.11.0](/cpp/docs/reference/spanner/2.11.0/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition) \nThe [`ReadPartition`](/cpp/docs/reference/spanner/latest/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition) class is a regular type that represents a single slice of a parallel Read operation. \nInstances of [`ReadPartition`](/cpp/docs/reference/spanner/latest/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition) are created by [`Client::PartitionRead`](/cpp/docs/reference/spanner/latest/classgoogle_1_1cloud_1_1spanner_1_1Client#classgoogle_1_1cloud_1_1spanner_1_1Client_1a039dd1aa3b34ad3cbeda17d810809b17). Once created, [`ReadPartition`](/cpp/docs/reference/spanner/latest/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition) objects can be serialized, transmitted to separate processes, and used to read data in parallel using [`Client::Read`](/cpp/docs/reference/spanner/latest/classgoogle_1_1cloud_1_1spanner_1_1Client#classgoogle_1_1cloud_1_1spanner_1_1Client_1a167955c44cd3ccb46ffe07cad6e7e52b). If `data_boost` is set, those requests will be executed using the independent compute resources of Cloud Spanner Data Boost.\n\nConstructors\n------------\n\n### ReadPartition(ReadPartition const \\&)\n\nCopy and move.\n\n### ReadPartition(ReadPartition \\&\\&)\n\nCopy and move.\n\n### ReadPartition()\n\nConstructs an instance of [`ReadPartition`](/cpp/docs/reference/spanner/latest/classgoogle_1_1cloud_1_1spanner_1_1ReadPartition) that does not specify any table or columns to be read.\n\nOperators\n---------\n\n### operator=(ReadPartition const \\&)\n\nCopy and move.\n\n### operator=(ReadPartition \\&\\&)\n\nCopy and move.\n\nFunctions\n---------\n\n### TableName() const\n\n### ColumnNames() const\n\n### ReadOptions() const"]]