-
Notifications
You must be signed in to change notification settings - Fork 984
Closed
Labels
Description
Code of Conduct
- I agree to follow this project's Code of Conduct
Search before asking
- I have searched in the issues and found no similar issues.
Describe the bug
Lines 159 to 187 in 1a69772
| plan.getClass.getName match { | |
| case classname if DB_COMMAND_SPECS.contains(classname) => | |
| val desc = DB_COMMAND_SPECS(classname) | |
| desc.databaseDescs.foreach { databaseDesc => | |
| try { | |
| val database = databaseDesc.extract(plan) | |
| if (databaseDesc.isInput) { | |
| inputObjs += PrivilegeObject(database) | |
| } else { | |
| outputObjs += PrivilegeObject(database) | |
| } | |
| } catch { | |
| case e: Exception => | |
| LOG.debug(databaseDesc.error(plan, e)) | |
| } | |
| } | |
| desc.operationType | |
| case classname if TABLE_COMMAND_SPECS.contains(classname) => | |
| val spec = TABLE_COMMAND_SPECS(classname) | |
| spec.tableDescs.foreach { td => | |
| if (td.isInput) { | |
| inputObjs ++= getTablePriv(td) | |
| } else { | |
| outputObjs ++= getTablePriv(td) | |
| } | |
| } | |
| spec.queries(plan).foreach(buildQuery(_, inputObjs, spark = spark)) | |
| spec.operationType |
As the code listed above, duplicated AnalyzeTablesCommand in authz seems to be an issue, it won't be processed more than one time.
additionally, the extractor is incorrect.
kyuubi/extensions/spark/kyuubi-spark-authz/src/main/resources/table_command_spec.json
Lines 912 to 921 in 1a69772
| "classname" : "org.apache.spark.sql.execution.command.AnalyzeTablesCommand", | |
| "tableDescs" : [ { | |
| "fieldName" : "tableIdent", | |
| "fieldExtractor" : "TableIdentifierTableExtractor", | |
| "columnDesc" : null, | |
| "actionTypeDesc" : null, | |
| "tableTypeDesc" : null, | |
| "catalogDesc" : null, | |
| "isInput" : true, | |
| "setCurrentDatabaseIfMissing" : false |
case class AnalyzeTablesCommand(
databaseName: Option[String],
noScan: Boolean) extends LeafRunnableCommand {
...
}
Affects Version(s)
master
Kyuubi Server Log Output
No response
Kyuubi Engine Log Output
No response
Kyuubi Server Configurations
No response
Kyuubi Engine Configurations
No response
Additional context
No response
Are you willing to submit PR?
- Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
- No. I cannot submit a PR at this time.