You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by GitBox <gi...@apache.org> on 2022/12/19 14:27:24 UTC
[GitHub] [incubator-kyuubi] bowenliang123 opened a new pull request, #4015: [Authz] add catalog to DatabaseSpec and extract catalog for ResolvedNamespaceDatabaseExtractor and ResolvedDBObjectName
bowenliang123 opened a new pull request, #4015:
URL: https://github.com/apache/incubator-kyuubi/pull/4015
<!--
Thanks for sending a pull request!
Here are some tips for you:
1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/CONTRIBUTING.html
2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
-->
### _Why are the changes needed?_
<!--
Please clarify why the changes are needed. For instance,
1. If you add a feature, you can talk about the use case of it.
2. If you fix a bug, you can clarify why it is a bug.
-->
1. add `catalogSpec` to DatabaseSpec and `catalog` filed in Database
2. extract catalog for ResolvedNamespaceDatabaseExtractor and ResolvedDBObjectName in databaseExtractors of DSV2
### _How was this patch tested?_
- [ ] 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.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
--
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
[GitHub] [kyuubi] yaooqinn closed pull request #4015: [Authz] Support catalog in DatabaseDesc and extract catalog for ResolvedNamespace and ResolvedDBObjectName of dsv2
Posted by GitBox <gi...@apache.org>.
yaooqinn closed pull request #4015: [Authz] Support catalog in DatabaseDesc and extract catalog for ResolvedNamespace and ResolvedDBObjectName of dsv2
URL: https://github.com/apache/kyuubi/pull/4015
--
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
[GitHub] [incubator-kyuubi] codecov-commenter commented on pull request #4015: [Authz] support catalog in DatabaseSpec and extract catalog for ResolvedNamespace and ResolvedDBObjectName of dsv2
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #4015:
URL: https://github.com/apache/incubator-kyuubi/pull/4015#issuecomment-1359220702
# [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/4015?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#4015](https://codecov.io/gh/apache/incubator-kyuubi/pull/4015?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (ff46482) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/c577dc7e0685656fb2b6a22d997a9dd5e78744a4?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (c577dc7) will **increase** coverage by `0.87%`.
> The diff coverage is `83.33%`.
```diff
@@ Coverage Diff @@
## master #4015 +/- ##
============================================
+ Coverage 52.11% 52.98% +0.87%
Complexity 13 13
============================================
Files 541 542 +1
Lines 29468 29497 +29
Branches 3938 3941 +3
============================================
+ Hits 15357 15630 +273
+ Misses 12709 12435 -274
- Partials 1402 1432 +30
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/4015?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...che/kyuubi/plugin/spark/authz/serde/Database.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/4015/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZW5zaW9ucy9zcGFyay9reXV1Ymktc3BhcmstYXV0aHovc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvcGx1Z2luL3NwYXJrL2F1dGh6L3NlcmRlL0RhdGFiYXNlLnNjYWxh) | `66.66% <66.66%> (ø)` | |
| [.../plugin/spark/authz/serde/databaseExtractors.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/4015/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZW5zaW9ucy9zcGFyay9reXV1Ymktc3BhcmstYXV0aHovc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvcGx1Z2luL3NwYXJrL2F1dGh6L3NlcmRlL2RhdGFiYXNlRXh0cmFjdG9ycy5zY2FsYQ==) | `83.33% <70.00%> (-6.67%)` | :arrow_down: |
| [.../kyuubi/plugin/spark/authz/PrivilegesBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/4015/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZW5zaW9ucy9zcGFyay9reXV1Ymktc3BhcmstYXV0aHovc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvcGx1Z2luL3NwYXJrL2F1dGh6L1ByaXZpbGVnZXNCdWlsZGVyLnNjYWxh) | `90.29% <100.00%> (ø)` | |
| [...e/kyuubi/plugin/spark/authz/serde/Descriptor.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/4015/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZW5zaW9ucy9zcGFyay9reXV1Ymktc3BhcmstYXV0aHovc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9reXV1YmkvcGx1Z2luL3NwYXJrL2F1dGh6L3NlcmRlL0Rlc2NyaXB0b3Iuc2NhbGE=) | `83.87% <100.00%> (+1.31%)` | :arrow_up: |
| [...rg/apache/kyuubi/ctl/cmd/log/LogBatchCommand.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/4015/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWN0bC9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9jdGwvY21kL2xvZy9Mb2dCYXRjaENvbW1hbmQuc2NhbGE=) | `60.00% <0.00%> (-7.70%)` | :arrow_down: |
| [.../kyuubi/server/mysql/constant/MySQLErrorCode.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/4015/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvY29uc3RhbnQvTXlTUUxFcnJvckNvZGUuc2NhbGE=) | `13.84% <0.00%> (-6.16%)` | :arrow_down: |
| [...ache/kyuubi/server/mysql/MySQLCommandHandler.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/4015/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxDb21tYW5kSGFuZGxlci5zY2FsYQ==) | `77.77% <0.00%> (-4.05%)` | :arrow_down: |
| [...ache/kyuubi/server/mysql/MySQLGenericPackets.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/4015/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2ZXIvbXlzcWwvTXlTUUxHZW5lcmljUGFja2V0cy5zY2FsYQ==) | `76.59% <0.00%> (-2.13%)` | :arrow_down: |
| [...apache/kyuubi/service/TBinaryFrontendService.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/4015/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLWNvbW1vbi9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9zZXJ2aWNlL1RCaW5hcnlGcm9udGVuZFNlcnZpY2Uuc2NhbGE=) | `48.38% <0.00%> (-1.08%)` | :arrow_down: |
| [...n/scala/org/apache/kyuubi/engine/ProcBuilder.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/4015/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-a3l1dWJpLXNlcnZlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2t5dXViaS9lbmdpbmUvUHJvY0J1aWxkZXIuc2NhbGE=) | `80.74% <0.00%> (-0.63%)` | :arrow_down: |
| ... and [27 more](https://codecov.io/gh/apache/incubator-kyuubi/pull/4015/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
: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=The+Apache+Software+Foundation)
--
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
[GitHub] [kyuubi] yaooqinn commented on a diff in pull request #4015: [Authz] support catalog in DatabaseSpec and extract catalog for ResolvedNamespace and ResolvedDBObjectName of dsv2
Posted by GitBox <gi...@apache.org>.
yaooqinn commented on code in PR #4015:
URL: https://github.com/apache/kyuubi/pull/4015#discussion_r1057552002
##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/serde/Descriptor.scala:
##########
@@ -151,7 +158,10 @@ case class FunctionDesc(
val functionExtractor = functionExtractors(fieldExtractor)
var function = functionExtractor(functionVal)
if (function.database.isEmpty) {
- function = function.copy(database = databaseDesc.map(_.extract(v)))
+ val maybeDatabase = databaseDesc.map(_.extract(v))
Review Comment:
irrelevant changes
--
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
[GitHub] [kyuubi] bowenliang123 commented on pull request #4015: [Authz] support catalog in DatabaseSpec and extract catalog for ResolvedNamespace and ResolvedDBObjectName of dsv2
Posted by GitBox <gi...@apache.org>.
bowenliang123 commented on PR #4015:
URL: https://github.com/apache/kyuubi/pull/4015#issuecomment-1365619574
cc @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
[GitHub] [kyuubi] bowenliang123 commented on a diff in pull request #4015: [Authz] support catalog in DatabaseSpec and extract catalog for ResolvedNamespace and ResolvedDBObjectName of dsv2
Posted by GitBox <gi...@apache.org>.
bowenliang123 commented on code in PR #4015:
URL: https://github.com/apache/kyuubi/pull/4015#discussion_r1057556461
##########
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/DatabaseCommands.scala:
##########
@@ -68,38 +69,50 @@ object DatabaseCommands {
val AnalyzeTables = {
DatabaseCommandSpec(
"org.apache.spark.sql.execution.command.AnalyzeTablesCommand",
- Seq(DatabaseDesc("databaseName", "StringOptionDatabaseExtractor", true)),
+ Seq(DatabaseDesc("databaseName", "StringOptionDatabaseExtractor", isInput = true)),
"ANALYZE_TABLE")
}
val SetDatabase = {
val cmd = "org.apache.spark.sql.execution.command.SetDatabaseCommand"
- val databaseDesc = DatabaseDesc("databaseName", "StringDatabaseExtractor", true)
+ val databaseDesc = DatabaseDesc("databaseName", "StringDatabaseExtractor", isInput = true)
DatabaseCommandSpec(cmd, Seq(databaseDesc), "SWITCHDATABASE")
}
val DescribeDatabase = {
val cmd = "org.apache.spark.sql.execution.command.DescribeDatabaseCommand"
- val databaseDesc = DatabaseDesc("databaseName", "StringDatabaseExtractor", true)
+ val databaseDesc = DatabaseDesc("databaseName", "StringDatabaseExtractor", isInput = true)
DatabaseCommandSpec(cmd, Seq(databaseDesc), "DESCDATABASE")
}
val SetCatalogAndNamespace = {
val cmd = "org.apache.spark.sql.catalyst.plans.logical.SetCatalogAndNamespace"
- val databaseDesc1 = DatabaseDesc("child", "ResolvedDBObjectNameDatabaseExtractor", true)
- val databaseDesc2 = DatabaseDesc("namespace", "StringSeqOptionDatabaseExtractor", true)
+ val databaseDesc1 =
+ DatabaseDesc("child", "ResolvedDBObjectNameDatabaseExtractor", isInput = true)
+ val databaseDesc2 =
+ DatabaseDesc(
+ "namespace",
+ "StringSeqOptionDatabaseExtractor",
+ catalogDesc = Some(CatalogDesc(
+ fieldName = "catalogName",
+ fieldExtractor = "StringOptionCatalogExtractor")),
+ isInput = true)
DatabaseCommandSpec(cmd, Seq(databaseDesc1, databaseDesc2), "SWITCHDATABASE")
}
val SetNamespace = {
val cmd = "org.apache.spark.sql.execution.command.SetNamespaceCommand"
- val databaseDesc = DatabaseDesc("namespace", "StringSeqDatabaseExtractor", true)
+ val databaseDesc = DatabaseDesc(
Review Comment:
No logic changed. Code change here is adapting to new field `catalogDesc` added before `isInput` of `DatabaseDesc`, same way as `TableDesc`.
--
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
[GitHub] [kyuubi] bowenliang123 commented on a diff in pull request #4015: [Authz] support catalog in DatabaseSpec and extract catalog for ResolvedNamespace and ResolvedDBObjectName of dsv2
Posted by GitBox <gi...@apache.org>.
bowenliang123 commented on code in PR #4015:
URL: https://github.com/apache/kyuubi/pull/4015#discussion_r1057554086
##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/serde/Descriptor.scala:
##########
@@ -151,7 +158,10 @@ case class FunctionDesc(
val functionExtractor = functionExtractors(fieldExtractor)
var function = functionExtractor(functionVal)
if (function.database.isEmpty) {
- function = function.copy(database = databaseDesc.map(_.extract(v)))
+ val maybeDatabase = databaseDesc.map(_.extract(v))
Review Comment:
I think it's relevant as FunctionDesc using DataDesc, and now Database instead of pure string return from DataDesc
--
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
[GitHub] [kyuubi] bowenliang123 commented on pull request #4015: [Authz] support catalog in DatabaseDesc and extract catalog for ResolvedNamespace and ResolvedDBObjectName of dsv2
Posted by GitBox <gi...@apache.org>.
bowenliang123 commented on PR #4015:
URL: https://github.com/apache/kyuubi/pull/4015#issuecomment-1365754352
> Please fix the PR title DatabaseSpec -> DatabaseDesc
OK, fixed the typo.
--
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
[GitHub] [kyuubi] yaooqinn commented on pull request #4015: [Authz] support catalog in DatabaseSpec and extract catalog for ResolvedNamespace and ResolvedDBObjectName of dsv2
Posted by GitBox <gi...@apache.org>.
yaooqinn commented on PR #4015:
URL: https://github.com/apache/kyuubi/pull/4015#issuecomment-1365753104
Please fix the PR title DatabaseSpec -> DatabaseDesc
--
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
[GitHub] [kyuubi] yaooqinn commented on pull request #4015: [Authz] Support catalog in DatabaseDesc and extract catalog for ResolvedNamespace and ResolvedDBObjectName of dsv2
Posted by GitBox <gi...@apache.org>.
yaooqinn commented on PR #4015:
URL: https://github.com/apache/kyuubi/pull/4015#issuecomment-1367055697
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
[GitHub] [kyuubi] yaooqinn commented on a diff in pull request #4015: [Authz] support catalog in DatabaseSpec and extract catalog for ResolvedNamespace and ResolvedDBObjectName of dsv2
Posted by GitBox <gi...@apache.org>.
yaooqinn commented on code in PR #4015:
URL: https://github.com/apache/kyuubi/pull/4015#discussion_r1057554306
##########
extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/DatabaseCommands.scala:
##########
@@ -68,38 +69,50 @@ object DatabaseCommands {
val AnalyzeTables = {
DatabaseCommandSpec(
"org.apache.spark.sql.execution.command.AnalyzeTablesCommand",
- Seq(DatabaseDesc("databaseName", "StringOptionDatabaseExtractor", true)),
+ Seq(DatabaseDesc("databaseName", "StringOptionDatabaseExtractor", isInput = true)),
"ANALYZE_TABLE")
}
val SetDatabase = {
val cmd = "org.apache.spark.sql.execution.command.SetDatabaseCommand"
- val databaseDesc = DatabaseDesc("databaseName", "StringDatabaseExtractor", true)
+ val databaseDesc = DatabaseDesc("databaseName", "StringDatabaseExtractor", isInput = true)
DatabaseCommandSpec(cmd, Seq(databaseDesc), "SWITCHDATABASE")
}
val DescribeDatabase = {
val cmd = "org.apache.spark.sql.execution.command.DescribeDatabaseCommand"
- val databaseDesc = DatabaseDesc("databaseName", "StringDatabaseExtractor", true)
+ val databaseDesc = DatabaseDesc("databaseName", "StringDatabaseExtractor", isInput = true)
DatabaseCommandSpec(cmd, Seq(databaseDesc), "DESCDATABASE")
}
val SetCatalogAndNamespace = {
val cmd = "org.apache.spark.sql.catalyst.plans.logical.SetCatalogAndNamespace"
- val databaseDesc1 = DatabaseDesc("child", "ResolvedDBObjectNameDatabaseExtractor", true)
- val databaseDesc2 = DatabaseDesc("namespace", "StringSeqOptionDatabaseExtractor", true)
+ val databaseDesc1 =
+ DatabaseDesc("child", "ResolvedDBObjectNameDatabaseExtractor", isInput = true)
+ val databaseDesc2 =
+ DatabaseDesc(
+ "namespace",
+ "StringSeqOptionDatabaseExtractor",
+ catalogDesc = Some(CatalogDesc(
+ fieldName = "catalogName",
+ fieldExtractor = "StringOptionCatalogExtractor")),
+ isInput = true)
DatabaseCommandSpec(cmd, Seq(databaseDesc1, databaseDesc2), "SWITCHDATABASE")
}
val SetNamespace = {
val cmd = "org.apache.spark.sql.execution.command.SetNamespaceCommand"
- val databaseDesc = DatabaseDesc("namespace", "StringSeqDatabaseExtractor", true)
+ val databaseDesc = DatabaseDesc(
Review Comment:
irrelevant changes
--
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
[GitHub] [kyuubi] yaooqinn commented on a diff in pull request #4015: [Authz] support catalog in DatabaseDesc and extract catalog for ResolvedNamespace and ResolvedDBObjectName of dsv2
Posted by GitBox <gi...@apache.org>.
yaooqinn commented on code in PR #4015:
URL: https://github.com/apache/kyuubi/pull/4015#discussion_r1057556935
##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/serde/Descriptor.scala:
##########
@@ -151,7 +158,10 @@ case class FunctionDesc(
val functionExtractor = functionExtractors(fieldExtractor)
var function = functionExtractor(functionVal)
if (function.database.isEmpty) {
- function = function.copy(database = databaseDesc.map(_.extract(v)))
+ val maybeDatabase = databaseDesc.map(_.extract(v))
Review Comment:
I see
--
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