-
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.
48556: sql: enable enum values to be stored in tables and used in queries r=rohany a=rohany This PR enables the use of ENUM types in SQL queries and tables. Release note (sql change): This PR enables the use of Postgres ENUM types. It allows ENUMs to be used in queries and stored in tables. 48588: rowcontainer: row container for inverted index computations r=sumeerbhola a=sumeerbhola DiskBackedNumberedRowContainer is a container that stores index => row mappings, where the index is densely numbered starting from 0. It has two uses: - It can be used for joinReader (lookup join) to replace the current use of DiskBackedIndexedRowContainer. - It has the additional ability to de-duplicate the key of the rows written to it (where all the columns in the row are in the key). This is the mode in which it will be used for inverted index computations. The index => row mapping is stored using a DiskBackedRowContainer, since the latter already has most of the needed support for first writing to memory and then spilling to disk -- the key is set to be empty. After spilling, when DiskRowContainer is the underlying container, we rely on the RowID it introduces. For reading from the DiskRowContainer, there is a new numberedRowIterator that supports a seekToIndex() method, which can be used to avoid iterating over many intermediate ssblocks. The DiskBackedNumberedRowContainer has a numberedDiskRowIterator that uses the aforementioned numberedRowIterator and decides when to seek or next. Additionally, it contains an in-memory cache -- due to the cache misses observed in issue 48118, this cache uses knowledge of the full future access pattern that is known for both joinReader and the inverted index cases to optimally cache. This caching algorithm has not been experimentally validated and it is possible that it may not improve cache hit rates (it will be significantly better than LRU if the reuse distance is greater than the cache size). It has more book-keeping overhead so some experimental validation will be done before integrating with joinReader. For de-duplication, needed for inverted index computations, one additionally needs a row => index map. This is constructed by modifying DiskBackedRowContainer and introducing a de-duplicate mode. To make this work without flushing the batch after each write, we maintain a map[string]uint64 for the rows that are in the batch. The coordination between this map and the batch flushes required the introduction of SortedDiskMapBatchWriter.NumPutsSinceFlush() This code currently lacks tests -- I am looking for early feedback. It includes a strawman integration with joinReader -- that will be removed before merging. Release note: None 48763: roachtest: add expected passes to pgjdbc test r=apantel a=rafiss Release note: none Co-authored-by: Rohan Yadav <[email protected]> Co-authored-by: sumeerbhola <[email protected]> Co-authored-by: Rafi Shamim <[email protected]>
- Loading branch information
Showing
38 changed files
with
2,024 additions
and
186 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
Large diffs are not rendered by default.
Oops, something went wrong.
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.