-
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.
Browse files
Browse the repository at this point in the history
69905: colexec: adds support for partial ordering in topk sorter r=rharding6373 a=rharding6373 Previously, topKSorter had to process all input rows before returning the top K rows according to its specified ordering. If a subset of the input rows were already ordered, topKSorter would still iterate over the entire input. However, if the input was partially ordered, topKSorter could potentially stop iterating early, since after it has found K candidates it is guaranteed not to find any better top candidates. For example, take the following query and table with an index on a: ``` a | b ----+---- 1 | 5 2 | 3 2 | 1 3 | 3 5 | 3 SELECT * FROM t ORDER BY a, b LIMIT 2 ``` Given an index scan on a to provide `a`'s ordering, topk only needs to process 3 rows in order to guarantee that it has found the top K rows. Once it finishes processing the third row `[2, 1]`, all subsequent rows have higher values of `a` than the top 2 rows found so far, and therefore cannot be in the top 2 rows. This change modifies the vectorized engine's TopKSorter signature to include a partial ordering. The TopKSorter chunks the input according to the sorted columns and processes each chunk with its existing heap algorithm. At the end of each chunk, if K rows are in the heap, TopKSorter emits the rows and stops execution. A later commit, once merged with top K optimizer and distsql changes, will adjust the cost model for top K to reflect this change. Release note: N/A 70285: log: add `version` field to `json` formatted log entries r=knz a=cameronnunez Fixes [#70202](#70202). Release note (cli change): version details have been added to all json formatted log entries. Refer to the reference docs for details about the field. 70380: backupccl: drop temp system database on failed restore r=irfansharif a=adityamaru Previously, if a restore failed during execution we would not cleanup the temproary system db descriptor that we create during a cluster restore. A `SHOW DATABASES` after the failed restore would show the `crdb_temp_system` database as well. This change adds logic to drop the database in the OnFailOrCancel hook of the retore job. Fixes: #70324 Release note: None 70452: backupccl: fix error when restoring a table that references a type defined in user-defined schema r=gh-casper a=gh-casper Previously, restore would fail if trying to restore a table that references a type defined in a user defined schema in a new database. This change adds logic to use ID of the schema in the restoring DB for a type if this schema has the same name as in the DB backed up. Fixes: #70168 Release note: none 70472: sql: include ON UPDATE on CREATE TABLE LIKE for INCLUDING DEFAULTS r=rafiss a=otan Resolves #69258 Release note (sql change): CREATE TABLE ... LIKE ... now copies ON UPDATE definitions for INCLUDING DEFAULTS. 70500: vendor: bump Pebble to 9509dcb7a53a r=sumeerbhola a=jbowens ``` 9509dcb compaction: fix nil pointer during errored compactions d27f1d7 internal/base: add SetWithDelete key kind 971533d base: add `InternalKeyKindSeparator` 3f0c125 cmd/pebble: specify format major version ``` Informs #70443. Release note: none 70511: authors: add Jon Tsiros to authors r=jtsiros a=jtsiros Release note: None 70518: authors: add mbookham7 to authors r=mbookham7 a=mbookham7 Release note: None 70525: sql: interleaved tables notice was incorrectly labeled as an error r=fqazi a=fqazi Previously, interleaved tables were only deprecated, and later on we fully dropped support for them returning a new notice with the word "error" indicating they were no-ops. This was inadequates because the message is not fatal and only a notice. To address this, this patch will change them message type to notice. Release note: None Co-authored-by: rharding6373 <rharding6373@users.noreply.github.com> Co-authored-by: Cameron Nunez <cameron@cockroachlabs.com> Co-authored-by: Aditya Maru <adityamaru@gmail.com> Co-authored-by: Casper <casper@cockroachlabs.com> Co-authored-by: Oliver Tan <otan@cockroachlabs.com> Co-authored-by: Jackson Owens <jackson@cockroachlabs.com> Co-authored-by: Jon Tsiros <tsiros@cockroachlabs.com> Co-authored-by: Mike Bookham <bookham@cockroachlabs.com> Co-authored-by: Faizan Qazi <faizan@cockroachlabs.com>
- Loading branch information
Showing
46 changed files
with
1,369 additions
and
237 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
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
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
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
Oops, something went wrong.