Skip to content

Commit dcc5cc0

Browse files
authored
Merge pull request #19140 from benesch/zone-sql
cli,config,sql: add experimental zone config SQL syntax
2 parents ed033a9 + f98fbcb commit dcc5cc0

27 files changed

+10427
-9417
lines changed

pkg/cli/cli_test.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -502,8 +502,8 @@ func Example_zone() {
502502
c.Run("zone ls")
503503
c.Run("zone get .meta")
504504
c.Run("zone get system.nonexistent")
505-
c.Run("zone get system.lease")
506-
c.Run("zone set system.lease --file=./testdata/zone_attrs.yaml")
505+
c.Run("zone get system.descriptor")
506+
c.Run("zone set system.descriptor --file=./testdata/zone_attrs.yaml")
507507
c.Run("zone set system.namespace --file=./testdata/zone_attrs.yaml")
508508
c.Run("zone set system.nonexistent --file=./testdata/zone_attrs.yaml")
509509
c.Run("zone set system --file=./testdata/zone_range_max_bytes.yaml")
@@ -551,21 +551,21 @@ func Example_zone() {
551551
// num_replicas: 1
552552
// constraints: []
553553
// zone get system.nonexistent
554-
// system.nonexistent not found
555-
// zone get system.lease
554+
// pq: relation "system.nonexistent" does not exist
555+
// zone get system.descriptor
556556
// system
557557
// range_min_bytes: 1048576
558558
// range_max_bytes: 67108864
559559
// gc:
560560
// ttlseconds: 90000
561561
// num_replicas: 1
562562
// constraints: [us-east-1a, ssd]
563-
// zone set system.lease --file=./testdata/zone_attrs.yaml
564-
// setting zone configs for individual system tables is not supported; try setting your config on the entire "system" database instead
563+
// zone set system.descriptor --file=./testdata/zone_attrs.yaml
564+
// pq: cannot set zone configs for system config tables; try setting your config on the entire "system" database instead
565565
// zone set system.namespace --file=./testdata/zone_attrs.yaml
566-
// setting zone configs for individual system tables is not supported; try setting your config on the entire "system" database instead
566+
// pq: cannot set zone configs for system config tables; try setting your config on the entire "system" database instead
567567
// zone set system.nonexistent --file=./testdata/zone_attrs.yaml
568-
// system.nonexistent not found
568+
// pq: relation "system.nonexistent" does not exist
569569
// zone set system --file=./testdata/zone_range_max_bytes.yaml
570570
// range_min_bytes: 1048576
571571
// range_max_bytes: 134217728
@@ -582,11 +582,11 @@ func Example_zone() {
582582
// num_replicas: 3
583583
// constraints: [us-east-1a, ssd]
584584
// zone rm system
585-
// DELETE 1
585+
// CONFIGURE ZONE 1
586586
// zone ls
587587
// .default
588588
// zone rm .default
589-
// unable to remove special zone .default
589+
// pq: cannot remove default zone
590590
// zone set .meta --file=./testdata/zone_range_max_bytes.yaml
591591
// range_min_bytes: 1048576
592592
// range_max_bytes: 134217728
@@ -652,22 +652,22 @@ func Example_zone() {
652652
// num_replicas: 1
653653
// constraints: []
654654
// zone rm .meta
655-
// DELETE 1
655+
// CONFIGURE ZONE 1
656656
// zone rm .system
657-
// DELETE 1
657+
// CONFIGURE ZONE 1
658658
// zone ls
659659
// .default
660660
// .timeseries
661661
// zone rm .timeseries
662-
// DELETE 1
662+
// CONFIGURE ZONE 1
663663
// zone ls
664664
// .default
665665
// zone rm .meta
666-
// DELETE 0
666+
// CONFIGURE ZONE 0
667667
// zone rm .system
668-
// DELETE 0
668+
// CONFIGURE ZONE 0
669669
// zone rm .timeseries
670-
// DELETE 0
670+
// CONFIGURE ZONE 0
671671
}
672672

673673
func Example_sql() {

0 commit comments

Comments
 (0)