-
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.
sql: set hash-sharded index column type to INT8
Shard columns of hash-sharded indexes are computed columns with an expression in the form `mod(fnv32(crdb_internal.datums_to_bytes(...)))`. The `mod()` builtin returns a value of type `INT8`, while the shard column's type was previously `INT4`. Because these types did not match, `mod` expressions were wrapped in the assignment cast function, `crdb_internal.assignment_cast`, in mutation query plans. This commit changes the type of newly created shard columns to `INT8`, eliminating the need for an assignment cast. Because all integers are encoded as varints in keys and values, this will not increase the amount of space on disk required for these columns. Release justification: This is a minor change to hash-sharded indexes, which are a newly un-experimentalized feature in the upcoming release. Release note (sql change): The type of shard columns created for hash-sharded indexes have changed from `INT4` to `INT8`. This should have no effect on behavior or performance.
- Loading branch information
Showing
11 changed files
with
522 additions
and
522 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
350 changes: 175 additions & 175 deletions
350
pkg/ccl/logictestccl/testdata/logic_test/partitioning_hash_sharded_index_query_plan
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
Oops, something went wrong.