Skip to content

Commit

Permalink
Merge pull request cockroachdb#24482 from danhhz/cdc
Browse files Browse the repository at this point in the history
changefeedccl: add prototype of EXPERIMENTAL_CHANGEFEED
  • Loading branch information
danhhz authored Apr 6, 2018
2 parents cc882bf + b6dd0ab commit c49273d
Show file tree
Hide file tree
Showing 20 changed files with 1,343 additions and 147 deletions.
2 changes: 1 addition & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions docs/generated/sql/bnf/stmt_block.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -646,10 +646,12 @@ unreserved_keyword ::=
| 'DISCARD'
| 'DOUBLE'
| 'DROP'
| 'EMIT'
| 'ENCODING'
| 'EXECUTE'
| 'EXPERIMENTAL'
| 'EXPERIMENTAL_AUDIT'
| 'EXPERIMENTAL_CHANGEFEED'
| 'EXPERIMENTAL_FINGERPRINTS'
| 'EXPERIMENTAL_REPLICA'
| 'EXPLAIN'
Expand Down
6 changes: 4 additions & 2 deletions pkg/ccl/backupccl/backup.go
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,9 @@ func loadAllDescs(
return allDescs, nil
}

func resolveTargetsToDescriptors(
// ResolveTargetsToDescriptors performs name resolution on a set of targets and
// returns the resulting descriptors.
func ResolveTargetsToDescriptors(
ctx context.Context, p sql.PlanHookState, endTime hlc.Timestamp, targets tree.TargetList,
) ([]sqlbase.Descriptor, []sqlbase.ID, error) {
allDescs, err := loadAllDescs(ctx, p.ExecCfg().DB, endTime)
Expand Down Expand Up @@ -859,7 +861,7 @@ func backupPlanHook(
requireVersion2 = true
}

targetDescs, completeDBs, err := resolveTargetsToDescriptors(ctx, p, endTime, backupStmt.Targets)
targetDescs, completeDBs, err := ResolveTargetsToDescriptors(ctx, p, endTime, backupStmt.Targets)
if err != nil {
return err
}
Expand Down
1 change: 1 addition & 0 deletions pkg/ccl/ccl_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
// ccl init hooks
_ "github.com/cockroachdb/cockroach/pkg/ccl/backupccl"
_ "github.com/cockroachdb/cockroach/pkg/ccl/buildccl"
_ "github.com/cockroachdb/cockroach/pkg/ccl/changefeedccl"
_ "github.com/cockroachdb/cockroach/pkg/ccl/cliccl"
_ "github.com/cockroachdb/cockroach/pkg/ccl/importccl"
_ "github.com/cockroachdb/cockroach/pkg/ccl/partitionccl"
Expand Down
Loading

0 comments on commit c49273d

Please sign in to comment.