-
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 #5964][BUG] Avoid check not fully optimized query for InsertIntoDataSourceDirCommand and InsertIntoDataSourceCommand #5983
Conversation
…toDataSourceDirCommand and InsertIntoDataSourceCommand
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5983 +/- ##
============================================
- Coverage 61.21% 61.06% -0.15%
Complexity 23 23
============================================
Files 622 622
Lines 36897 37036 +139
Branches 5016 5023 +7
============================================
+ Hits 22585 22617 +32
- Misses 11877 11973 +96
- Partials 2435 2446 +11 ☔ View full report in Codecov by Sentry. |
ping @yaooqinn |
@@ -757,7 +757,8 @@ class HiveCatalogRangerSparkExtensionSuite extends RangerSparkExtensionSuite { | |||
s"""INSERT OVERWRITE DIRECTORY '/tmp/test_dir' | |||
| USING parquet | |||
| SELECT * FROM $db1.$table;""".stripMargin))) | |||
assert(e.getMessage.contains(s"does not have [select] privilege on [$db1/$table/id]")) |
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.
we never check the read table anymore?
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.
we never check the read table anymore?
If execute, it will check the generated new plan from dataSource.planForWriting(saveMode, query)
thanks, merged to master |
…nsertIntoDataSourceDirCommand and InsertIntoDataSourceCommand # 🔍 Description ## Issue References 🔗 This pull request fixes apache#5964 ## Describe Your Solution 🔧 InsertIntoDataSourceDirCommand and InsertIntoDataSourceCommand‘s query is not fully optimized, we direct check it's query will cause request privilege that we haven't used. We can directly ignore the query's check. Since we will check it's generated plan. Still will request the correct privilege of the SQL ## 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#5983 from AngersZhuuuu/KYUUBI-5964. Closes apache#5964 1adcf8d [Angerszhuuuu] update 7204c9f [Angerszhuuuu] [KYUUBI-5964][BUG] Avoid check not fully optimized query for InsertIntoDataSourceDirCommand and InsertIntoDataSourceCommand Authored-by: Angerszhuuuu <[email protected]> Signed-off-by: Kent Yao <[email protected]>
…nsertIntoDataSourceDirCommand and InsertIntoDataSourceCommand # 🔍 Description ## Issue References 🔗 This pull request fixes apache#5964 ## Describe Your Solution 🔧 InsertIntoDataSourceDirCommand and InsertIntoDataSourceCommand‘s query is not fully optimized, we direct check it's query will cause request privilege that we haven't used. We can directly ignore the query's check. Since we will check it's generated plan. Still will request the correct privilege of the SQL ## 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#5983 from AngersZhuuuu/KYUUBI-5964. Closes apache#5964 1adcf8d [Angerszhuuuu] update 7204c9f [Angerszhuuuu] [KYUUBI-5964][BUG] Avoid check not fully optimized query for InsertIntoDataSourceDirCommand and InsertIntoDataSourceCommand Authored-by: Angerszhuuuu <[email protected]> Signed-off-by: Kent Yao <[email protected]>
🔍 Description
Issue References 🔗
This pull request fixes #5964
Describe Your Solution 🔧
InsertIntoDataSourceDirCommand and InsertIntoDataSourceCommand‘s query is not fully optimized, we direct check it's query will cause request privilege that we haven't used.
We can directly ignore the query's check. Since we will check it's generated plan. Still will request the correct privilege of the SQL
Types of changes 🔖
Test Plan 🧪
Behavior Without This Pull Request ⚰️
Behavior With This Pull Request 🎉
Related Unit Tests
Checklist 📝
Be nice. Be informative.