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 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