This issue covers phase 1 of #83819. As described in this comment, we should support a mode where we return an error if we cannot prove that the query can run in a single region. This can be supported entirely in the optimizer, and would require giving the "distribute" operator a very large cost (similar to other hints where we give non-compliant plans a "hugeCost"). The execbuilder would then return an error if the chosen plan has a distribute operator. Note that in this first phase, we do not error in the execution engine, so if LOS fails to find a row locally, we may still visit remote regions.
Jira issue: CRDB-18646
Epic: CRDB-17276
This issue covers phase 1 of #83819. As described in this comment, we should support a mode where we return an error if we cannot prove that the query can run in a single region. This can be supported entirely in the optimizer, and would require giving the "distribute" operator a very large cost (similar to other hints where we give non-compliant plans a "hugeCost"). The execbuilder would then return an error if the chosen plan has a distribute operator. Note that in this first phase, we do not error in the execution engine, so if LOS fails to find a row locally, we may still visit remote regions.
Jira issue: CRDB-18646
Epic: CRDB-17276