-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql: support IMPORT PGDUMP into table with partial indexes #50225
Comments
Currently, there is no paradigm for evaluating expressions, like partial index predicates, during an
Therefore, I think a suitable first step for partial indexes is to err when trying to |
Another workaround that has worked for us is to use |
This change adds logic to IMPORT INTO to support partial indexes when ingesting data into an existing table. The change relies on the `PartialIndexUpdateHelper` to indicate whether a row should be added to a partial index or not. It is important to call out that this only adds support to formats supporting IMPORT INTO i.e. CSV, Delimited, AVRO. Bundle formats do not support partial indexes. Informs: cockroachdb#50225 Release note (sql change): Users can now IMPORT INTO a table with partial indexes from CSV, AVRO, and Delimited formats. This was previously disallowed.
This change adds logic to IMPORT INTO to support partial indexes when ingesting data into an existing table. The change relies on the `PartialIndexUpdateHelper` to indicate whether a row should be added to a partial index or not. It is important to call out that this only adds support to formats supporting IMPORT INTO i.e. CSV, Delimited, AVRO. Bundle formats do not support partial indexes. Informs: cockroachdb#50225 Release note (sql change): Users can now IMPORT INTO a table with partial indexes from CSV, AVRO, and Delimited formats. This was previously disallowed.
fyi @rafiss another SQL incompatibility mentioned for IMPORT |
85036: kvserver,storage: Support range keys in CheckSSTConflicts r=erikgrinaker a=itsbilal Add support for MVCC range tombstones when checking for SST conflicts and calculating stats incrementally in CheckSSTConflicts. This unfortunately blew up logic in CheckSSTConflicts a lot, but most of that should be gated behind conditionals that cause a low impact on performance for non-rangekey sstables. One part of #83405. Release note: None. 85094: sqlccl: fix TestAuthenticateWithSessionRevivalToken flake r=knz a=rafiss fixes #84899 The test must wait for the cluster setting to propagate to avoid flakes. Release note: None 85244: importccl: support partial indexes in IMPORT INTO r=mgartner a=ecwall This change adds logic to IMPORT INTO to support partial indexes when ingesting data into an existing table. The change relies on the `PartialIndexUpdateHelper` to indicate whether a row should be added to a partial index or not. It is important to call out that this only adds support to formats supporting IMPORT INTO i.e. CSV, Delimited, AVRO. Bundle formats do not support partial indexes. Informs: #50225 Release note (sql change): Users can now IMPORT INTO a table with partial indexes from CSV, AVRO, and Delimited formats. This was previously disallowed. Co-authored-by: Bilal Akhtar <[email protected]> Co-authored-by: Rafi Shamim <[email protected]> Co-authored-by: Evan Wall <[email protected]>
This has been tested and merged in #85244, but PGDUMP has not yet been tested. |
we won't schedule this work, as per #93660 |
Description
CockroachDB does not currently support
IMPORT
ing into a table with partial indexes.Workaround for IMPORTing into a table with partial indexes
IMPORT
.Workaround for IMPORTing a PGDUMP with partial indexes
Notes
In order to support this, the
DatumRowConverter
will need to evaluate partial index predicate expressions with the variables replaced with each row's values. I've left a TODO here.Jira issue: CRDB-4140
Epic CRDB-8353
The text was updated successfully, but these errors were encountered: