-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Enhancement] statistics sql skip backlist check #67174
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
Signed-off-by: Seaven <[email protected]>
|
@cursor review |
| if (context.isStatisticsConnection() || context.isStatisticsJob()) { | ||
| // For statistics connection or job, we trust it and skip sql blacklist check | ||
| LOG.debug("skip sql blacklist check for statistics connection or job. stmt: {}", | ||
| origStmt.originStmt); |
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.
NullPointerException when accessing origStmt for statistics logging
The code accesses origStmt.originStmt for debug logging when context.isStatisticsConnection() or context.isStatisticsJob() is true, but origStmt can be null since parsedStmt.getOrigStmt() may return null. The original code had the null check as the first condition, but the new statistics check happens before verifying origStmt != null, causing a potential NullPointerException.
|
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]❌ fail : 2 / 3 (66.67%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |



Why I'm doing:
What I'm doing:
Fixes #issue
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
Behavioral tweak in
StmtExecutorQueryStatement/InsertStmt/CreateTableAsSelectStmt, whenConfig.enable_sql_blacklistis on, skip verifying against the SQL blacklist if the context is a statistics connection or job; otherwise proceed as before.Scope: FE query execution path around blacklist validation. Risk: Low; limited to statistics contexts.
Written by Cursor Bugbot for commit 646ecda. This will update automatically on new commits. Configure here.