Wenyi Hu
Wenyi Hu
I split the other PR https://github.com/cockroachdb/cockroach/pull/85354. This PR contains changes in the optimizer, and the other PR only has notice related code.
*[`pkg/sql/opt/exec/execbuilder/testdata/not_visible_index` line 192 at r1](https://reviewable.io/reviews/cockroachdb/cockroach/85794#-N97ly_w4jE_sRHexHK2:-N99hQ2KDSb_G1LWscdI:bsxshjh) ([raw file](https://github.com/cockroachdb/cockroach/blob/272799e8da60efa980fef81ecb78147a1832a2d3/pkg/sql/opt/exec/execbuilder/testdata/not_visible_index#L192)):* Previously, mgartner (Marcus Gartner) wrote… nit: add a test just like this with the index forced - you already have a similar tests...
*[`pkg/sql/opt/exec/execbuilder/testdata/not_visible_index` line 391 at r1](https://reviewable.io/reviews/cockroachdb/cockroach/85794#-N97mWSJ9hh9BxfNMWAH:-N99iFjHE2TMlmAR2SOm:b98yl4g) ([raw file](https://github.com/cockroachdb/cockroach/blob/272799e8da60efa980fef81ecb78147a1832a2d3/pkg/sql/opt/exec/execbuilder/testdata/not_visible_index#L391)):* Previously, mgartner (Marcus Gartner) wrote… I'm not sure I understand the motivation for testing based on the sources. These functions should end up...
*[`pkg/sql/opt/exec/execbuilder/testdata/not_visible_index` line 793 at r1](https://reviewable.io/reviews/cockroachdb/cockroach/85794#-N97pjNS2MSCS4HuoWNN:-N99jCzG-umeRJWp_EW3:b-wsl87l) ([raw file](https://github.com/cockroachdb/cockroach/blob/272799e8da60efa980fef81ecb78147a1832a2d3/pkg/sql/opt/exec/execbuilder/testdata/not_visible_index#L793)):* Previously, mgartner (Marcus Gartner) wrote… There's a [delete cascade fast path](https://github.com/cockroachdb/cockroach/blob/8004e0d6e78da30f7d329008c485e6f5abaa6b0b/pkg/sql/opt/optbuilder/fk_cascade.go#L116-L140) that we should test here. Notice the slight difference in the two...
TFTRs! bors r+
retrying ... bors r+
I would want to change the cluster setting name as well, but I'm not sure if this counts as a breaking change. Wdyt?
I'm not 100% sure if this is backportable. Happy to close it if we don't feel comfortable backporting it.