When trying to write a query using Spanner Data Boost I get the following error:
DataBoost used for non-partitioned query
The code I'm using is as follows:
stmt := spanner.Statement{
SQL: query,
Params: params,
}
iter := client.Single().QueryWithOptions(ctx, stmt, spanner.QueryOptions{
Priority: spannerpb.RequestOptions_PRIORITY_LOW,
DataBoostEnabled: true,
})
Queries using Data Boost must be executed as described in the Cloud Spanner docs and use
PartitionQueryWithOptions. My code that works: