feat(spanner): add option for DataBoost#5447
feat(spanner): add option for DataBoost#5447olavloite wants to merge 3 commits intogoogleapis:mainfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5447 +/- ##
==========================================
- Coverage 97.73% 97.73% -0.01%
==========================================
Files 217 217
Lines 48186 48243 +57
==========================================
+ Hits 47096 47151 +55
- Misses 1090 1092 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Adds an option to use DataBoost with partitioned queries and partitioned reads.
890f875 to
992138e
Compare
| /// // On a worker receiving a partition, execute it with Data Boost: | ||
| /// let options = PartitionExecuteOptions::default() | ||
| /// .with_data_boost(true); | ||
| /// let mut result_set = partitions[0].execute(&db_client, options).await?; |
There was a problem hiding this comment.
We tend to use builders so applications don't have to supply default options everywhere.
Maybe like p.execute(&db_client).set_data_boost(true).send().await
Thoughts?
There was a problem hiding this comment.
Fair point. However, our other execute(..) methods all really execute the statement, and I would prefer this method to be consistent with that pattern. So I've changed this so that Partition has a with_data_boost method (and could also hold more options in the future if needed). The call then looks like this:
let mut result_set = partitions[0].clone()
.with_data_boost(true)
.execute(&db_client)
.await?;
Adds an option to use DataBoost with partitioned queries and partitioned reads.