-
Notifications
You must be signed in to change notification settings - Fork 5.5k
fix: Default to utilizing all columns for UPDATE, DELETE and ANALYZE queries #26480
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: master
Are you sure you want to change the base?
Conversation
…nd ANALYZE queries for access control checks
Reviewer's GuideThis PR enhances the UtilizedColumnsAnalyzer to treat UPDATE, DELETE, and ANALYZE statements as unsupported AST nodes—triggering a fallback that includes all table columns in access control checks—and updates the unit tests to cover this fallback behavior and properly merge column references. Sequence diagram for fallback column utilization in UPDATE, DELETE, ANALYZEsequenceDiagram
participant "UtilizedColumnsAnalyzer"
participant "SAC API"
participant "Table"
"UtilizedColumnsAnalyzer"->>"Table": Detect UPDATE/DELETE/ANALYZE node
"UtilizedColumnsAnalyzer"->>"Table": Retrieve all columns
"UtilizedColumnsAnalyzer"->>"SAC API": Pass all columns for access control check
"SAC API"-->>"UtilizedColumnsAnalyzer": Access control result
Class diagram for updated UtilizedColumnsAnalyzer node handlingclassDiagram
class UtilizedColumnsAnalyzer {
+visitUpdate(node, context)
+visitDelete(node, context)
+visitAnalyze(node, context)
+notSupportedNode(node)
handleRelation(relation, context, children)
}
UtilizedColumnsAnalyzer : visitUpdate() calls notSupportedNode()
UtilizedColumnsAnalyzer : visitDelete() calls notSupportedNode()
UtilizedColumnsAnalyzer : visitAnalyze() calls notSupportedNode()
UtilizedColumnsAnalyzer : notSupportedNode() throws NotSupportedException
class NotSupportedException
UtilizedColumnsAnalyzer --> NotSupportedException
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
for access control checks
Motivation and Context
This is a partial fix for #26466
Impact
UPDATE, DELETE and ANALYZE queries will have their relevant columns passed to the SAC APIs
Without this, empty column lists were being passed
Test Plan
New unit test added
Contributor checklist
Release Notes