An index on expression means something like
in this case the optimizer should be able to use an index.
This task naturally splits in two steps:
- add expression matching into the optimizer, use it for generated columns. Like in
CREATE TABLE t1 (a int, b int, c INT GENERATED ALWAYS AS (a/2+b), INDEX (c));
- support the syntax to create an index on expression directly, this will automatically create a hidden generated column under the hood
original task description is visible in the history