Skip to content
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 partitioned hash sharded index #76358

Commits on Feb 21, 2022

  1. sql: support partitioned hash sharded index

    Validations are added based on 2 rules:
    1. hash sharded index cannot work with any explicit partitioning
    2. hash sharded index cannot have partitioning field as explicit key column
    
    Also have a minor fix on how we calculate number of implicit columns.
    
    Release note (sql change): Previously, crdb blocked users from creating
    hash sharded index in all kinds of partitioned tables including implict
    partitioned tables using `PARTITION ALL BY` or `REGIONAL BY ROW`. Now
    we turn on the support of hash sharded index in implicit partitioned
    tables. Which means primary key cannot be hash sharded if a table is
    explicitly partitioned with `PARTITION BY` or an index cannot be hash
    sharded if the index is explicitly partitioned with `PARTITION BY`.
    Paritioning columns cannot be placed explicitly as key columns of a
    hash sharded index as well, including regional-by-row table's `crdb_region`
    column.
    chengxiong-ruan committed Feb 21, 2022
    Configuration menu
    Copy the full SHA
    185b163 View commit details
    Browse the repository at this point in the history
  2. sql: presplit implicit partitioned list hash sharded index

    Release note (sql change): When a hash sharded index is partitioned,
    ranges are pre-split within every single possible partition on shard
    boundaries. Each partition is split up to 16 ranges, otherwise split
    into the number bucket count ranges. Note that, only list partition
    is being presplit, we don't presplit for range partition.
    chengxiong-ruan committed Feb 21, 2022
    Configuration menu
    Copy the full SHA
    e7caa94 View commit details
    Browse the repository at this point in the history