-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multi-region: Unblock IMPORT into allowable multi-region tables
Unblock IMPORTing into allowable multi-region tables. We only support importing into GLOBAL and REGIONAL BY TABLE tables as #61133 is blocking IMPORT into any tables which have columns generated using a user defined type (which covers REGIONAL BY ROW tables, as they have the crdb_region column which is generated using the crdb_internal_region type). This commit includes tests for both IMPORT and IMPORT INTO, as well as cases which illustrate #61133 for non-multi-region tables. Release note: None Release justification: Fixes bug in interaction between existing functionality and new multi-region feature.
- Loading branch information
Showing
7 changed files
with
220 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
pkg/ccl/importccl/testdata/avro/simple-schema-multi-region-regional-by-row.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
-- noinspection SqlDialectInspectionForFile | ||
|
||
-- noinspection SqlNoDataSourceInspectionForFile | ||
|
||
CREATE TABLE public.simple ( | ||
i integer PRIMARY KEY, | ||
s text, | ||
b bytea | ||
) LOCALITY REGIONAL BY ROW; | ||
|
10 changes: 10 additions & 0 deletions
10
pkg/ccl/importccl/testdata/avro/simple-schema-multi-region.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
-- noinspection SqlDialectInspectionForFile | ||
|
||
-- noinspection SqlNoDataSourceInspectionForFile | ||
|
||
CREATE TABLE public.simple ( | ||
i integer PRIMARY KEY, | ||
s text, | ||
b bytea | ||
) LOCALITY REGIONAL BY TABLE; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters