This is an automated email from the ASF dual-hosted git repository.
fchen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 9cda08bee [KYUUBI #5529][AUTHZ][FOLLOWUP] Remove useless
org.apache.spark.sql.delta.commands.CreateDeltaTableCommand
9cda08bee is described below
commit 9cda08beea58f06c327e66071c3f96a4800b16be
Author: zml1206 <[email protected]>
AuthorDate: Wed Nov 1 12:10:48 2023 +0800
[KYUUBI #5529][AUTHZ][FOLLOWUP] Remove useless
org.apache.spark.sql.delta.commands.CreateDeltaTableCommand
### _Why are the changes needed?_
To close #5529 .
Remove useless
`org.apache.spark.sql.delta.commands.CreateDeltaTableCommand`.
Because the logical plans for Delta Lake create table and replace table are
`org.apache.spark.sql.catalyst.plans.logical.CreateTable`,
`org.apache.spark.sql.catalyst.plans.logical.CreateV2Table` and
`org.apache.spark.sql.catalyst.plans.logical.ReplaceTable`.
### _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.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.
Closes #5571 from zml1206/KYUUBI-5529-FOLLOWUP.
Closes #5529
0908571ce [zml1206] Remove useless
org.apache.spark.sql.delta.commands.CreateDeltaTableCommand
Authored-by: zml1206 <[email protected]>
Signed-off-by: Fu Chen <[email protected]>
---
.../src/main/resources/table_command_spec.json | 15 ----------
.../plugin/spark/authz/gen/DeltaCommands.scala | 33 ----------------------
.../spark/authz/gen/JsonSpecFileGenerator.scala | 2 +-
3 files changed, 1 insertion(+), 49 deletions(-)
diff --git
a/extensions/spark/kyuubi-spark-authz/src/main/resources/table_command_spec.json
b/extensions/spark/kyuubi-spark-authz/src/main/resources/table_command_spec.json
index 67e027c6e..81dfa6cbc 100644
---
a/extensions/spark/kyuubi-spark-authz/src/main/resources/table_command_spec.json
+++
b/extensions/spark/kyuubi-spark-authz/src/main/resources/table_command_spec.json
@@ -1968,19 +1968,4 @@
"opType" : "QUERY",
"queryDescs" : [ ],
"uriDescs" : [ ]
-}, {
- "classname" : "org.apache.spark.sql.delta.commands.CreateDeltaTableCommand",
- "tableDescs" : [ {
- "fieldName" : "table",
- "fieldExtractor" : "CatalogTableTableExtractor",
- "columnDesc" : null,
- "actionTypeDesc" : null,
- "tableTypeDesc" : null,
- "catalogDesc" : null,
- "isInput" : false,
- "setCurrentDatabaseIfMissing" : false
- } ],
- "opType" : "CREATETABLE",
- "queryDescs" : [ ],
- "uriDescs" : [ ]
} ]
\ No newline at end of file
diff --git
a/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/DeltaCommands.scala
b/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/DeltaCommands.scala
deleted file mode 100644
index 6435a64f5..000000000
---
a/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/DeltaCommands.scala
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.kyuubi.plugin.spark.authz.gen
-
-import org.apache.kyuubi.plugin.spark.authz.OperationType._
-import org.apache.kyuubi.plugin.spark.authz.serde._
-
-object DeltaCommands extends CommandSpecs[TableCommandSpec] {
-
- val CreateDeltaTableCommand = {
- val cmd = "org.apache.spark.sql.delta.commands.CreateDeltaTableCommand"
- val tableDesc = TableDesc("table", classOf[CatalogTableTableExtractor])
- TableCommandSpec(cmd, Seq(tableDesc), CREATETABLE)
- }
-
- override def specs: Seq[TableCommandSpec] = Seq(
- CreateDeltaTableCommand)
-}
diff --git
a/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/JsonSpecFileGenerator.scala
b/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/JsonSpecFileGenerator.scala
index 5fb4ace10..07a8e2852 100644
---
a/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/JsonSpecFileGenerator.scala
+++
b/extensions/spark/kyuubi-spark-authz/src/test/scala/org/apache/kyuubi/plugin/spark/authz/gen/JsonSpecFileGenerator.scala
@@ -44,7 +44,7 @@ class JsonSpecFileGenerator extends AnyFunSuite {
// scalastyle:on
test("check spec json files") {
writeCommandSpecJson("database", Seq(DatabaseCommands))
- writeCommandSpecJson("table", Seq(TableCommands, IcebergCommands,
HudiCommands, DeltaCommands))
+ writeCommandSpecJson("table", Seq(TableCommands, IcebergCommands,
HudiCommands))
writeCommandSpecJson("function", Seq(FunctionCommands))
writeCommandSpecJson("scan", Seq(Scans))
}