Skip to content

Commit

Permalink
docs: use 'latest' stats package in samples to prevent build failures (
Browse files Browse the repository at this point in the history
…#1313)

The list of available statistics packages will change over time, meaning that the
samples need to use 'latest' to prevent build failures when a package has been
cleaned up by the backend.

Fixes #1273
  • Loading branch information
olavloite committed Jul 26, 2021
1 parent bafb369 commit 6a8351c
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -1510,7 +1510,9 @@ static void clientWithQueryOptions(DatabaseId db) {
db, QueryOptions
.newBuilder()
.setOptimizerVersion("1")
.setOptimizerStatisticsPackage("auto_20191128_14_47_22UTC")
// The list of available statistics packages can be found by querying the
// "INFORMATION_SCHEMA.SPANNER_STATISTICS" table.
.setOptimizerStatisticsPackage("latest")
.build())
.build();
Spanner spanner = options.getService();
Expand Down Expand Up @@ -1538,6 +1540,8 @@ static void queryWithQueryOptions(DatabaseClient dbClient) {
.withQueryOptions(QueryOptions
.newBuilder()
.setOptimizerVersion("1")
// The list of available statistics packages can be found by querying the
// "INFORMATION_SCHEMA.SPANNER_STATISTICS" table.
.setOptimizerStatisticsPackage("latest")
.build())
.build())) {
Expand Down

0 comments on commit 6a8351c

Please sign in to comment.