review-correctness-query-planner-execution

Review database query, planner, and execution engine diffs for correctness issues.

Updated Mar 3, 2026
One-click install
npx skills add https://github.com/D3Hunter/ai-engineer --skill review-correctness-query-planner-execution
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: review-correctness-query-planner-execution
Source: https://github.com/D3Hunter/ai-engineer/tree/main/skills/review-correctness-query-planner-execution
Command: npx skills add https://github.com/D3Hunter/ai-engineer --skill review-correctness-query-planner-execution

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Database query, planner, and execution engine changes often introduce subtle behavioral correctness issues and regression risks that are easy to miss during standard pull request reviews, leading to incorrect query results, semantic corruption, or production outages when merged.

Core Features & Use Cases

  • Static Analysis-First Review: Performs diff-focused static analysis of code changes without running build or test commands, keeping review latency low.
  • Comprehensive Correctness Checklist: Runs a mandatory, section-by-section checklist covering SQL semantics, parser/binder rules, optimizer logic, execution operator contracts, and behavior-preservation requirements.
  • High-Risk Edge Case Gates: Includes specialized validation gates for high-risk areas like stream tokenization, chunked record framing, reverse/forward scan paths, and pushdown/rewrite operator preservation to catch boundary-related regressions.
  • Use Case: A database engineering team merging a query optimizer change can use this skill to verify that predicate pushdown logic correctly handles NULL values and outer-join semantics, and that new execution operators do not drop required rows in edge cases.

Quick Start

Use the review-correctness-query-planner-execution skill to review the pull request diff for query, planner, and execution engine changes in your cloned database codebase, outputting structured correctness findings to the specified JSON file.

Frequently Asked Questions about review-correctness-query-planner-execution

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review database query planner changes for behavioral correctness during pull requests?

Review database query planner changes for behavioral correctness by running static analysis on pull request diffs to enforce domain invariants and preserve operator semantics. This identifies regression risks in optimizer rewrites and predicate pushdown logic before merge.

What edge cases should I check when modifying SQL execution operators and stream tokenization?

When modifying SQL execution operators and stream tokenization, check edge cases like chunked record framing boundaries, reverse and forward scan paths, and pushdown operator preservation. Specialized validation gates catch these boundary-related regressions in execution engine code.

How does static analysis detect query regression risks in database engine code without running tests?

Static analysis detects query regression risks by performing diff-focused review of database engine code changes without running build or test commands. It applies a mandatory correctness checklist covering SQL semantics, parser binding rules, and execution operator contracts to keep latency low.

Can I use diff-based static analysis to validate optimizer rewrites and predicate pushdown in SQL?

Yes, you can use diff-based static analysis to validate optimizer rewrites and predicate pushdown in SQL. It systematically verifies that logic correctly handles NULL values and outer-join semantics, ensuring behavior-preservation requirements are met before merging.

When do I need a correctness checklist for reviewing database execution engine code changes?

You need a correctness checklist for reviewing database execution engine code changes when diffs touch SQL parsing, query binding, optimizer logic, or execution operators. It enforces domain invariants and catches subtle semantic corruption that standard reviews easily miss.

What are the limitations of static analysis for catching query planner regressions pre-merge?

Static analysis for catching query planner regressions is limited to diff-focused review without executing build or test commands. It excels at semantic boundary validation but cannot replace dynamic runtime testing for verifying actual stream tokenization and chunked record framing execution paths.