Repository navigation
fix(parser): parse EXPLAIN EXECUTE for prepared statements - #2951
Merged
manticore-projects merged 1 commit intoNov 22, 2026
Conversation
Contributor
|
Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #2804.
DuckDB and PostgreSQL accept
EXPLAIN EXECUTE qfor a prepared statement. JSqlParser rejected this form because its EXPLAIN target only accepted queries and DML.The parser now reuses the existing
Executenode for this target in the default and PostgreSQL modes. It round-trips arguments and existing EXPLAIN options. MySQL still interpretsEXPLAIN EXECUTE qas a table and column, and bareEXPLAIN EXECUTEstill describes a table in the default mode.I verified both prepared-statement forms with a local DuckDB 1.5.6 CLI. Five new positive regressions failed on the original grammar and passed with this change. The full Gradle check passed with 16,661 tests executed, 25 skipped, and zero JavaCC choice conflicts.
The repository's JMH workload averaged 13.88 ms/op on the baseline and 14.05 ms/op with the patch, with overlapping confidence intervals across three forks each.
DeepSeek assisted with implementation and the first review. The parser, database, and test results are from local runs.