Summary:
There is some code duplication for determining whether we can use query
optimizations due to the fact that the table/index being scanned are
colocated or copartitioned. This code is duplicated in yb_scan.c and
ybginscan.c. Deduplicate to a common function YbIsScanningCohostedRels.
In doing so, find the code is inconsistent, so create issue #25940 for
that and add a bunch of todos referencing it. Also, rename
YbcPgPrepareParameters.querying_colocated_table to
YbcPgPrepareParameters.embedded_idx.
Jira: DB-15286
Test Plan:
jenkins
Close: #25959
Reviewers: tnayak, #db-approvers, smishra
Reviewed By: tnayak, #db-approvers, smishra
Subscribers: yql
Differential Revision: https://phorge.dev.yugabyte.com/D41743