Skip to content

bench: yard_export emits predicate-owned subquery plans - #2

Merged
Aly700 merged 2 commits into
mainfrom
yard-export-subquery
Sep 2, 2026
Merged

bench: yard_export emits predicate-owned subquery plans#2
Aly700 merged 2 commits into
mainfrom
yard-export-subquery

Conversation

@Aly700

@Aly700 Aly700 commented Sep 2, 2026

Copy link
Copy Markdown
Owner

The JSON tree emitter walked only structural children, so a plan whose predicates own subquery plans (the materialised IN form) exported a tree missing the subquery branch. The emitter now walks comparison operands, IN/EXISTS predicate subplans, and null-aware predicates, emitting each as an op: "Subquery" child with its own estimate and children.

docs/yard/yard-routes.json and the "Yard Routes" section of docs/benchmarks.md are re-exported from the same Release configuration. No library, test, or CI change.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T06:36:08.848454Z b63d0f9 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@Aly700
Aly700 merged commit 681310b into main Sep 2, 2026
4 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b63d0f9ab2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +171 to +174
if (predicate.kind == sql::PredicateKind::Comparison) {
collect_scalar_subquery(predicate.comparison.left, subqueries);
collect_scalar_subquery(predicate.comparison.right, subqueries);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Traverse scalar operands for every predicate kind

When a scalar subquery is used as the operand of IS NULL/IS NOT NULL, or as the left operand of IN/NOT IN, this comparison-only branch never visits predicate.null_check or predicate.in_value. As a result, yard_export omits those owned plans from the JSON tree (and for IN, emits only the membership subquery), even though the logical-plan printer includes both. Handle predicate kinds explicitly and collect scalar subqueries from each applicable operand.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant