Fix 'Unknown' placeholder in execution plan output for subplan filter cost model
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.9k
- Forks
- 339
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 52
Description
Environment
- Version: 5.7.25 OceanBase seekdb (r) (Built 1-e1ac5a57bf17078ca46ec9add574edeffac7c3f9 Apr 7 2026)
- Is this an RD-provided temporary version?: No
- Reproducibility: Stable reproduction
Description
When running the cost_model.subplan_filter_mysql test case, the execution plan output contains an Unknown placeholder where the actual correlated subquery condition should be displayed.
Steps to Reproduce
- Connect using:
mysql -uroot -h -P 2881 - Run the following SQL statements:
drop table if exists t1_subplan_filter;
create table t1_subplan_filter(
pk int primary key,
c1 int,
c2 number,
c3 varchar(10),
c4 json,
c5 text);
create index i1 on t1_subplan_filter(c2);
call dbms_stats.set_table_stats(
NULL,
't1_subplan_filter',
numrows => 1000000,
avgrlen => 100,
nummicroblks => 6000
);
explain select (select /*+no_unnest*/ count(*) from t1_subplan_filter) as ref from t1_subplan_filter;
- Observe the execution plan output. The issue is visible in the attached image.

Environment Information
Please provide the connection strings for the problematic tenant and the sys tenant, as well as deployment information.
Has the scene been preserved?
Log Information
No logs provided.
Other Notes
This issue was reported from an external business perspective. Please select the appropriate "Work Item Type" on the right based on the actual situation:
- Customer Service Feedback: Refers specifically to issues before production deployment or during POC, where a product bug is confirmed to require a fix and release.
- Online Issue: A problem that has occurred after production deployment, confirmed as a product bug but not classified as a fault.
- Online Fault: A problem that has occurred after production deployment, confirmed as a product bug, and has caused business errors or public impact on the customer side (the definition of a fault is at the discretion of the delivery service team).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the cost_model.subplan_filter_mysql test case and reproduce the EXPLAIN output using the SQL in the issue. Trace where the correlated subquery condition is rendered in the execution plan, then verify that the output shows that condition instead of "Unknown".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, sql
- Domain
- database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100