-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Feature] surport explain return type #63723
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
luoyuanluoyuan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
|
@cursor review |
| } | ||
| return GsonUtils.GSON.newBuilder().disableHtmlEscaping() | ||
| .create().toJson(queryColumnTypes); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Incomplete Type Information in EXPLAIN Output
The getColumnTypeExplain method only adds type information for SlotRef expressions. This omits non-SlotRef expressions (e.g., computed columns, literals, function calls) from the result, leading to an incomplete and inconsistent EXPLAIN TYPE output that doesn't match the query's actual columns.



Why I'm doing:
What I'm doing:
Fixes #63716
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check:
Note
Introduces
EXPLAIN TYPEto output query result column names/types as JSON, with parser, executor, plan support, and tests.TYPEto output query result column schema as JSON.StmtExecutor.buildExplainString(...): when level isTYPE, returns column types JSON; suppresses "EXECUTE IN FE" prefix for TYPE.StarRocks.g4) to acceptTYPEinEXPLAIN.AstBuilder: mapEXPLAIN TYPEtoStatementBase.ExplainLevel.TYPE.StatementBase: addTYPEtoExplainLevelenum.ExecPlan.getColumnTypeExplain(...): produce JSON array of{columnName,columnType}from output expressions; logs non-slot refs.QueryColumnType(name/type with Gson annotations).GetQueryColumnPlanTest: validates JSON schema output andexplain typepath.Written by Cursor Bugbot for commit 13d073a. This will update automatically on new commits. Configure here.