-
Notifications
You must be signed in to change notification settings - Fork 919
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
[KYUUBI #5780][AUTHZ] Treating PermanentViewMarker as LeafNode make code simple and got correct privilege object #5781
Conversation
@yaooqinn WDYT about this solution? |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #5781 +/- ##
============================================
- Coverage 61.42% 61.39% -0.03%
Complexity 23 23
============================================
Files 607 607
Lines 35944 35933 -11
Branches 4936 4935 -1
============================================
- Hits 22079 22062 -17
- Misses 11478 11486 +8
+ Partials 2387 2385 -2 ☔ View full report in Codecov by Sentry. |
...main/scala/org/apache/kyuubi/plugin/spark/authz/rule/permanentview/PermanentViewMarker.scala
Outdated
Show resolved
Hide resolved
Any more suggestion? |
please take care of the tests |
Fixed |
ping @yaooqinn GA passed and conflict resolved. |
Let's fulfill the PR desc |
The PR title is for refactoring, but actually what we do here is a bugfix, can we make it more precisely. |
How about current, desc also full fill. |
@@ -215,4 +215,4 @@ | |||
} ], | |||
"opType" : "SWITCHDATABASE", | |||
"uriDescs" : [ ] | |||
} ] | |||
} ] |
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.
I don't know why this pr needs to change this...But without this change, GA failed.
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.
cc @yaooqinn
Thank you, merged to master |
🔍 Description
Issue References 🔗
This pull request fixes #5780
Describe Your Solution 🔧
Currently, we convert persist view to PermanentViewMaker, but after optimizer, it changed its child, making it hard to do column prune and get the right column privilege object of persist view.
In this pr, we change PVM as a LeafNode, then we can directly treat it as a
HiveRelation
since we won't change its internal plan to make code simpler.But we need to re-optimize the child plan after do privilege check.
Types of changes 🔖
Test Plan 🧪
Behavior Without This Pull Request ⚰️
For sql such as below table and view
When we execute query on
$db1.$view1
It will first execute the subquery in the query, then got a un-correct column privilege
Behavior With This Pull Request 🎉
After this change, since PVM is a LeafNode, we won't execute the subquery under PVM, and we directly got the correct column privilege.
Related Unit Tests
Existed UT
Checklists
📝 Author Self Checklist
📝 Committer Pre-Merge Checklist
Be nice. Be informative.