Skip to content

Conversation

@AngersZhuuuu
Copy link
Contributor

@AngersZhuuuu AngersZhuuuu commented Jan 16, 2024

🔍 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 🔖

  • 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 📝

Be nice. Be informative.

@pan3793 pan3793 changed the title [KYUUBI-5937][Bug] PVM cause cache table not work [KYUUBI #5937][Bug] PVM cause cache table not work Jan 16, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 16, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (3915fe8) 61.21% compared to head (e28275f) 61.04%.
Report is 1 commits behind head on master.

Files Patch % Lines
...authz/rule/permanentview/PermanentViewMarker.scala 75.00% 1 Missing and 1 partial ⚠️
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.
📢 Have feedback on the report? Share it here.

Copy link
Member

@pan3793 pan3793 left a 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.

@pan3793 pan3793 changed the title [KYUUBI #5937][Bug] PVM cause cache table not work [KYUUBI #5937] PVM cause cache table not work Jan 18, 2024
@pan3793 pan3793 added this to the v1.8.1 milestone Jan 18, 2024
@pan3793 pan3793 closed this in d3a3853 Jan 18, 2024
zhaohehuhu pushed a commit to zhaohehuhu/incubator-kyuubi that referenced this pull request Feb 5, 2024
# 🔍 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>
zhaohehuhu pushed a commit to zhaohehuhu/incubator-kyuubi that referenced this pull request Mar 21, 2024
# 🔍 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] PVM cause cache table not work

3 participants