You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "AngersZhuuuu (via GitHub)" <gi...@apache.org> on 2023/10/17 08:58:07 UTC
[PR] [KYUUBI #5361] [AUTHZ] Support Drop/Repair/Truncate Table Commands for Hudi [kyuubi]
AngersZhuuuu opened a new pull request, #5445:
URL: https://github.com/apache/kyuubi/pull/5445
### _Why are the changes needed?_
To close #5361. Kyuubi authz support hudi drop/repair/truncate table commands
- DropHoodieTableCommand: https://hudi.apache.org/docs/sql_ddl#create-table
- RepairHoodieTableCommand: https://hudi.apache.org/docs/sql_ddl#create-table-as-select-ctas
- TruncateHoodieTableCommand: https://github.com/apache/hudi/blob/master/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/command/CreateHoodieTableLikeCommand.scala
### _How was this patch tested?_
- [x] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [ ] Add screenshots for manual tests if appropriate
- [ ] [Run test](https://kyuubi.readthedocs.io/en/master/contributing/code/testing.html#running-tests) locally before make a pull request
### _Was this patch authored or co-authored using generative AI tooling?_
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [KYUUBI #5361] [AUTHZ] Support Drop/Repair/Truncate Table Commands for Hudi [kyuubi]
Posted by "AngersZhuuuu (via GitHub)" <gi...@apache.org>.
AngersZhuuuu commented on PR #5445:
URL: https://github.com/apache/kyuubi/pull/5445#issuecomment-1767535248
> > Seems the repair table command generates a v2 table when running UT together, but generates v1 table when running this test separately...checking
>
> It's OK to separate it from this PR
DOne
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [KYUUBI #5361] [AUTHZ] Support Drop/Repair/Truncate Table Commands for Hudi [kyuubi]
Posted by "bowenliang123 (via GitHub)" <gi...@apache.org>.
bowenliang123 commented on PR #5445:
URL: https://github.com/apache/kyuubi/pull/5445#issuecomment-1766088088
Please ensure both POSITIVE and NEGATIVE test cases next time. Positive cases have been added.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [KYUUBI #5361] [AUTHZ] Support Drop/Repair/Truncate Table Commands for Hudi [kyuubi]
Posted by "AngersZhuuuu (via GitHub)" <gi...@apache.org>.
AngersZhuuuu commented on PR #5445:
URL: https://github.com/apache/kyuubi/pull/5445#issuecomment-1766093922
> Please ensure both POSITIVE and NEGATIVE test cases next time. Positive cases have been added.
👌
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [KYUUBI #5361] [AUTHZ] Support Drop/Repair/Truncate Table Commands for Hudi [kyuubi]
Posted by "yaooqinn (via GitHub)" <gi...@apache.org>.
yaooqinn commented on PR #5445:
URL: https://github.com/apache/kyuubi/pull/5445#issuecomment-1766543351
> Seems the repair table command generates a v2 table when running UT together, but generates v1 table when running this test separately...checking
It's OK to separate it from this PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [KYUUBI #5361] [AUTHZ] Support Drop/Truncate Table Commands for Hudi [kyuubi]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #5445:
URL: https://github.com/apache/kyuubi/pull/5445#issuecomment-1767622241
## [Codecov](https://app.codecov.io/gh/apache/kyuubi/pull/5445?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
> Merging [#5445](https://app.codecov.io/gh/apache/kyuubi/pull/5445?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (ed9d43a) into [master](https://app.codecov.io/gh/apache/kyuubi/commit/f6ccc4d80fc925d51540595c3b18556c220dd70e?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) (f6ccc4d) will **not change** coverage.
> Report is 1 commits behind head on master.
> The diff coverage is `n/a`.
```diff
@@ Coverage Diff @@
## master #5445 +/- ##
======================================
Coverage 0.00% 0.00%
======================================
Files 588 588
Lines 33450 33450
Branches 4400 4400
======================================
Misses 33450 33450
```
:mega: We’re building smart automated test selection to slash your CI/CD build times. [Learn more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [KYUUBI #5361] [AUTHZ] Support Drop/Truncate Table Commands for Hudi [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 commented on PR #5445:
URL: https://github.com/apache/kyuubi/pull/5445#issuecomment-1767658518
Thanks, merged to master
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [KYUUBI #5361] [AUTHZ] Support Drop/Repair/Truncate Table Commands for Hudi [kyuubi]
Posted by "bowenliang123 (via GitHub)" <gi...@apache.org>.
bowenliang123 commented on code in PR #5445:
URL: https://github.com/apache/kyuubi/pull/5445#discussion_r1361840989
##########
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/ranger/HudiCatalogRangerSparkExtensionSuite.scala:
##########
@@ -206,4 +206,77 @@ class HudiCatalogRangerSparkExtensionSuite extends RangerSparkExtensionSuite {
|""".stripMargin)))(s"does not have [select] privilege on [$namespace1/$table1]")
}
}
+
+ test("DropHoodieTableCommand") {
+ withCleanTmpResources(Seq((s"$namespace1.$table1", "table"), (namespace1, "database"))) {
+ doAs(admin, sql(s"CREATE DATABASE IF NOT EXISTS $namespace1"))
+ doAs(
+ admin,
+ sql(
+ s"""
+ |CREATE TABLE IF NOT EXISTS $namespace1.$table1(id int, name string, city string)
+ |USING HUDI
+ |OPTIONS (
+ | type = 'cow',
+ | primaryKey = 'id',
+ | 'hoodie.datasource.hive_sync.enable' = 'false'
+ |)
+ |PARTITIONED BY(city)
+ |""".stripMargin))
+ interceptContains[AccessControlException](
+ doAs(
+ someone,
+ sql(s"DROP TABLE IF EXISTS $namespace1.$table1".stripMargin)))(
+ s"does not have [drop] privilege on [$namespace1/$table1]")
Review Comment:
```suggestion
interceptContains[AccessControlException] {
doAs(someone, sql(s"DROP TABLE IF EXISTS $namespace1.$table1".stripMargin))
}(s"does not have [drop] privilege on [$namespace1/$table1]")
```
Change to use "{}" embraces for interceptContains. To make the code more compact in style.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [KYUUBI #5361] [AUTHZ] Support Drop/Repair/Truncate Table Commands for Hudi [kyuubi]
Posted by "AngersZhuuuu (via GitHub)" <gi...@apache.org>.
AngersZhuuuu commented on PR #5445:
URL: https://github.com/apache/kyuubi/pull/5445#issuecomment-1766435002
Seems the repair table command generates a v2 table when running UT together, but generates v1 table when running this test separately...checking
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [KYUUBI #5361] [AUTHZ] Support Drop/Truncate Table Commands for Hudi [kyuubi]
Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 closed pull request #5445: [KYUUBI #5361] [AUTHZ] Support Drop/Truncate Table Commands for Hudi
URL: https://github.com/apache/kyuubi/pull/5445
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org
Re: [PR] [KYUUBI #5361] [AUTHZ] Support Drop/Repair/Truncate Table Commands for Hudi [kyuubi]
Posted by "AngersZhuuuu (via GitHub)" <gi...@apache.org>.
AngersZhuuuu commented on PR #5445:
URL: https://github.com/apache/kyuubi/pull/5445#issuecomment-1766057359
ping @bowenliang123 @yaooqinn
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org