[KYUUBI #4899] [AUTHZ] Extract function from FunctionIdentifier for CreateFunction and DropFunction in Spark 3.4
### _Why are the changes needed?_ - adapting changes in logical plan of CreateFunction/DropFunction in Spark 3.4 by extracting table object from `FunctionIdentifier`, to fix tests on Spark 3.4 - ut "CreateFunctionCommand" - ut "DropFunctionCommand" ### _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 - [x] [Run test](https://kyuubi.readthedocs.io/en/master/develop_tools/testing.html#running-tests) locally before make a pull request Closes #4899 from bowenliang123/authz-functionid. Closes #4899 464d3eb3d [liangbowen] apply FunctionIdentifierFunctionTypeExtractor to CreateFunction/DropFunction Authored-by: liangbowen <liangbowen@gf.com.cn> Signed-off-by: liangbowen <liangbowen@gf.com.cn>
This commit is contained in:
parent
a1ce7fb684
commit
eb5b07b9a7
@ -1,6 +1,16 @@
|
||||
[ {
|
||||
"classname" : "org.apache.spark.sql.execution.command.CreateFunctionCommand",
|
||||
"functionDescs" : [ {
|
||||
"fieldName" : "identifier",
|
||||
"fieldExtractor" : "FunctionIdentifierFunctionExtractor",
|
||||
"databaseDesc" : null,
|
||||
"functionTypeDesc" : {
|
||||
"fieldName" : "isTemp",
|
||||
"fieldExtractor" : "TempMarkerFunctionTypeExtractor",
|
||||
"skipTypes" : [ "TEMP" ]
|
||||
},
|
||||
"isInput" : false
|
||||
}, {
|
||||
"fieldName" : "functionName",
|
||||
"fieldExtractor" : "StringFunctionExtractor",
|
||||
"databaseDesc" : {
|
||||
@ -44,6 +54,16 @@
|
||||
}, {
|
||||
"classname" : "org.apache.spark.sql.execution.command.DropFunctionCommand",
|
||||
"functionDescs" : [ {
|
||||
"fieldName" : "identifier",
|
||||
"fieldExtractor" : "FunctionIdentifierFunctionExtractor",
|
||||
"databaseDesc" : null,
|
||||
"functionTypeDesc" : {
|
||||
"fieldName" : "isTemp",
|
||||
"fieldExtractor" : "TempMarkerFunctionTypeExtractor",
|
||||
"skipTypes" : [ "TEMP" ]
|
||||
},
|
||||
"isInput" : false
|
||||
}, {
|
||||
"fieldName" : "functionName",
|
||||
"fieldExtractor" : "StringFunctionExtractor",
|
||||
"databaseDesc" : {
|
||||
|
||||
@ -35,8 +35,12 @@ object FunctionCommands {
|
||||
"functionName",
|
||||
classOf[StringFunctionExtractor],
|
||||
Some(databaseDesc),
|
||||
Some(functionTypeDesc))
|
||||
FunctionCommandSpec(cmd, Seq(functionDesc), CREATEFUNCTION)
|
||||
functionTypeDesc = Some(functionTypeDesc))
|
||||
val functionIdentifierDesc = FunctionDesc(
|
||||
"identifier",
|
||||
classOf[FunctionIdentifierFunctionExtractor],
|
||||
functionTypeDesc = Some(functionTypeDesc))
|
||||
FunctionCommandSpec(cmd, Seq(functionIdentifierDesc, functionDesc), CREATEFUNCTION)
|
||||
}
|
||||
|
||||
val DescribeFunction = {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user