-
Notifications
You must be signed in to change notification settings - Fork 971
[KYUUBI #5937] PVM cause cache table not work #5982
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
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #5982 +/- ##
============================================
- Coverage 61.21% 61.04% -0.17%
Complexity 23 23
============================================
Files 622 622
Lines 36897 37043 +146
Branches 5016 5024 +8
============================================
+ Hits 22585 22613 +28
- Misses 11877 11980 +103
- Partials 2435 2450 +15 ☔ View full report in Codecov by Sentry. |
pan3793
left a comment
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.
LGTM, thanks for fixing this issue.
# 🔍 Description ## Issue References 🔗 This pull request fixes apache#5937 ## Describe Your Solution 🔧 If we cache a table with persist view in the query, since cache table use analyzed plan, so in kyuubi authz we will use PVM to wrap the view, but cache table use canonicalized plan, so we need to implement the `doCanonicalize()` method to ignore the impact of PVM, or it will cache cached table can't be matched. ## Types of changes 🔖 - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 #### Behavior Without This Pull Request ⚰️ #### Behavior With This Pull Request 🎉 #### Related Unit Tests --- # Checklist 📝 - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes apache#5982 from AngersZhuuuu/KYUUBI-5937. Closes apache#5937 e28275f [Angerszhuuuu] Update PermanentViewMarker.scala c504103 [Angerszhuuuu] Update PermanentViewMarker.scala 19102ff [Angerszhuuuu] [KYUUBI-5937][Bug] PVM cause cache table not work Authored-by: Angerszhuuuu <angers.zhu@gmail.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
# 🔍 Description ## Issue References 🔗 This pull request fixes apache#5937 ## Describe Your Solution 🔧 If we cache a table with persist view in the query, since cache table use analyzed plan, so in kyuubi authz we will use PVM to wrap the view, but cache table use canonicalized plan, so we need to implement the `doCanonicalize()` method to ignore the impact of PVM, or it will cache cached table can't be matched. ## Types of changes 🔖 - [x] Bugfix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) ## Test Plan 🧪 #### Behavior Without This Pull Request ⚰️ #### Behavior With This Pull Request 🎉 #### Related Unit Tests --- # Checklist 📝 - [ ] This patch was not authored or co-authored using [Generative Tooling](https://www.apache.org/legal/generative-tooling.html) **Be nice. Be informative.** Closes apache#5982 from AngersZhuuuu/KYUUBI-5937. Closes apache#5937 e28275f [Angerszhuuuu] Update PermanentViewMarker.scala c504103 [Angerszhuuuu] Update PermanentViewMarker.scala 19102ff [Angerszhuuuu] [KYUUBI-5937][Bug] PVM cause cache table not work Authored-by: Angerszhuuuu <angers.zhu@gmail.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
🔍 Description
Issue References 🔗
This pull request fixes #5937
Describe Your Solution 🔧
If we cache a table with persist view in the query, since cache table use analyzed plan, so in kyuubi authz we will use PVM to wrap the view, but cache table use canonicalized plan, so we need to implement the
doCanonicalize()method to ignore the impact of PVM, or it will cache cached table can't be matched.Types of changes 🔖
Test Plan 🧪
Behavior Without This Pull Request ⚰️
Behavior With This Pull Request 🎉
Related Unit Tests
Checklist 📝
Be nice. Be informative.