Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
468 changes: 24 additions & 444 deletions DEPS.bzl

Large diffs are not rendered by default.

58 changes: 8 additions & 50 deletions build/bazelutil/distdir_files.bzl

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ require (
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
honnef.co/go/tools v0.5.1
vitess.io/vitess v0.0.0-00010101000000-000000000000
)

require (
Expand Down Expand Up @@ -494,8 +493,6 @@ replace github.com/olekukonko/tablewriter => github.com/cockroachdb/tablewriter

replace github.com/abourget/teamcity => github.com/cockroachdb/teamcity v0.0.0-20180905144921-8ca25c33eb11

replace vitess.io/vitess => github.com/cockroachdb/vitess v0.0.0-20210218160543-54524729cc82

replace gopkg.in/yaml.v2 => github.com/cockroachdb/yaml v0.0.0-20210825132133-2d6955c8edbc

replace github.com/docker/docker => github.com/moby/moby v24.0.6+incompatible
Expand Down
115 changes: 0 additions & 115 deletions go.sum

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions pkg/backup/restore_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -985,9 +985,8 @@ func createImportingDescriptors(
for _, desc := range sqlDescs {
// Decide which offline tables to include in the restore:
//
// - An offline table created by RESTORE or IMPORT PGDUMP is
// fully discarded. The table will not exist in the restoring
// cluster.
// - An offline table created by RESTORE is fully discarded. The table
// will not exist in the restoring cluster.
//
// - An offline table undergoing an IMPORT INTO in traditional
// restore has all importing data elided in the restore
Expand Down
15 changes: 2 additions & 13 deletions pkg/build/starlarkutil/starlarkutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ func TestGetExistingMirrorsFromDepsBzl(t *testing.T) {
depsbzl := `# leading comment
load("@bazel_gazelle//:deps.bzl", "go_repository")
def go_deps():
go_repository(
name = "io_vitess_vitess",
build_file_proto_mode = "disable_global",
importpath = "vitess.io/vitess",
sha256 = "FAKESHA256",
strip_prefix = "github.com/cockroachdb/vitess@v0.0.0-20210218160543-54524729cc82",
urls = ["https://example.com/fakeurl"],
)
go_repository(
name = "com_github_akavel_rsrc",
build_file_proto_mode = "disable_global",
Expand All @@ -41,11 +33,8 @@ def go_deps():
`
mirrors, err := downloadableArtifactsFromDepsBzl(depsbzl)
require.NoError(t, err)
require.Equal(t, len(mirrors), 2)
mirror := mirrors["io_vitess_vitess"]
require.Equal(t, mirror.URL, "https://example.com/fakeurl")
require.Equal(t, mirror.Sha256, "FAKESHA256")
mirror = mirrors["com_github_alecthomas_units"]
require.Equal(t, len(mirrors), 1)
mirror := mirrors["com_github_alecthomas_units"]
require.Equal(t, mirror.URL, "https://foo/bar.zip")
require.Equal(t, mirror.Sha256, "abcdefghij")
}
2 changes: 0 additions & 2 deletions pkg/cmd/cr2pg/sqlstream/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import (
"github.com/cockroachdb/errors"
)

// Modified from importer/read_import_pgdump.go.

// Stream streams an io.Reader into tree.Statements.
type Stream struct {
scan *bufio.Scanner
Expand Down
31 changes: 4 additions & 27 deletions pkg/roachpb/io-formats.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@ message IOFileFormat {
Unknown = 0;
CSV = 1;
MysqlOutfile = 2;
Mysqldump = 3;
PgCopy = 4;
PgDump = 5;
Avro = 6;
Parquet = 7;

reserved 3, 5;
}

optional FileFormat format = 1 [(gogoproto.nullable) = false];
optional CSVOptions csv = 2 [(gogoproto.nullable) = false];
optional MySQLOutfileOptions mysql_out = 3 [(gogoproto.nullable) = false];
optional PgCopyOptions pg_copy = 4 [(gogoproto.nullable) = false];
optional MysqldumpOptions mysql_dump = 9 [(gogoproto.nullable) = false];
optional PgDumpOptions pg_dump = 6 [(gogoproto.nullable) = false];
optional AvroOptions avro = 8 [(gogoproto.nullable) = false];
optional ParquetOptions parquet = 10 [(gogoproto.nullable) = false];

Expand All @@ -41,6 +39,8 @@ message IOFileFormat {
optional Compression compression = 5 [(gogoproto.nullable) = false];
// If true, don't abort on failures but instead save the offending row and keep on.
optional bool save_rejected = 7 [(gogoproto.nullable) = false];

reserved 6, 9;
}


Expand Down Expand Up @@ -103,29 +103,6 @@ message PgCopyOptions {
optional int32 maxRowSize = 3 [(gogoproto.nullable) = false];
}

// PgDumpOptions describe the format of postgresql's pg_dump.
message PgDumpOptions {
// maxRowSize is the maximum row size
optional int32 maxRowSize = 1 [(gogoproto.nullable) = false];
// Indicates the number of rows to import per table.
// Must be a non-zero positive number.
optional int64 row_limit = 2 [(gogoproto.nullable) = false];
// Indicates if all unparseable and parseable, but unimplemented PGDUMP stmts
// should be ignored during IMPORT.
optional bool ignore_unsupported = 3 [(gogoproto.nullable) = false];
// Points to the destination where unsupported statements during a PGDUMP
// import should be logged. This can only be used when ignore_unsupported is
// specified, otherwise the IMPORT errors out on encountering an unsupported
// stmt.
optional string ignore_unsupported_log = 4 [(gogoproto.nullable) = false];
}

message MysqldumpOptions {
// Indicates the number of rows to import per table.
// Must be a non-zero positive number.
optional int64 row_limit = 1 [(gogoproto.nullable) = false];
}

message AvroOptions {
enum Format {
// Avro object container file input
Expand Down
9 changes: 0 additions & 9 deletions pkg/sql/importer/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ go_library(
"read_import_avro.go",
"read_import_base.go",
"read_import_csv.go",
"read_import_mysql.go",
"read_import_mysqlout.go",
"read_import_pgcopy.go",
"read_import_pgdump.go",
"read_import_workload.go",
"rollback_job.go",
],
Expand All @@ -31,7 +29,6 @@ go_library(
"//pkg/clusterversion",
"//pkg/col/coldata",
"//pkg/crosscluster",
"//pkg/docs",
"//pkg/featureflag",
"//pkg/jobs",
"//pkg/jobs/ingeststopped",
Expand All @@ -51,7 +48,6 @@ go_library(
"//pkg/sql/catalog/catpb",
"//pkg/sql/catalog/colinfo",
"//pkg/sql/catalog/dbdesc",
"//pkg/sql/catalog/descidgen",
"//pkg/sql/catalog/descpb",
"//pkg/sql/catalog/descs",
"//pkg/sql/catalog/ingesting",
Expand All @@ -70,10 +66,8 @@ go_library(
"//pkg/sql/isql",
"//pkg/sql/lexbase",
"//pkg/sql/opt/memo",
"//pkg/sql/parser",
"//pkg/sql/pgwire/pgcode",
"//pkg/sql/pgwire/pgerror",
"//pkg/sql/pgwire/pgnotice",
"//pkg/sql/physicalplan",
"//pkg/sql/privilege",
"//pkg/sql/row",
Expand All @@ -96,7 +90,6 @@ go_library(
"//pkg/util/errorutil/unimplemented",
"//pkg/util/hlc",
"//pkg/util/humanizeutil",
"//pkg/util/intsets",
"//pkg/util/ioctx",
"//pkg/util/log",
"//pkg/util/log/eventpb",
Expand All @@ -115,8 +108,6 @@ go_library(
"@com_github_cockroachdb_redact//:redact",
"@com_github_lib_pq//oid",
"@com_github_linkedin_goavro_v2//:goavro",
"@io_vitess_vitess//go/sqltypes",
"@io_vitess_vitess//go/vt/sqlparser",
],
)

Expand Down
Loading