Skip to content

sql: improved partial index implication with virtual columns #61565

@RaduBerinde

Description

@RaduBerinde

The issue tracks figuring out how to prove implication (and thus enable the use of the partial index) for cases like:

CREATE TABLE t (
  k INT PRIMARY KEY,
  a INT,
  b INT,
  c INT AS (b + 10) VIRTUAL,
  INDEX (a) WHERE c IN (10, 20, 30)
)

SELECT k FROM t WHERE c = 20

Jira issue: CRDB-2993

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-sql-queriesSQL Queries Team

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions