@InterfaceAudience.Public @InterfaceStability.Stable public class FuncSpec extends java.lang.Object implements java.io.Serializable, java.lang.Cloneable
Constructor and Description |
---|
FuncSpec(java.lang.String funcSpec) |
FuncSpec(java.lang.String funcSpec,
Schema inputArgsSchema) |
FuncSpec(java.lang.String className,
java.lang.String ctorArg) |
FuncSpec(java.lang.String className,
java.lang.String[] ctorArgs) |
FuncSpec(java.lang.String className,
java.lang.String[] ctorArgs,
Schema inputArgsSchema) |
Modifier and Type | Method and Description |
---|---|
FuncSpec |
clone() |
boolean |
equals(java.lang.Object other) |
static java.lang.String |
getArgStringFromSpec(java.lang.String funcSpec)
Get the argument values passed to the func spec.
|
java.lang.String |
getClassName() |
static java.lang.String |
getClassNameFromSpec(java.lang.String funcSpec)
Parse the class name out of a function specification string.
|
java.lang.String[] |
getCtorArgs() |
Schema |
getInputArgsSchema() |
int |
hashCode() |
static java.util.List<java.lang.String> |
parseArguments(java.lang.String argString)
Parse the argument values out of a function specification string.
|
void |
setClassName(java.lang.String className) |
void |
setCtorArgs(java.lang.String[] ctorArgs) |
void |
setInputArgsSchema(Schema inputArgsSchema) |
java.lang.String |
toString() |
public FuncSpec(java.lang.String className, java.lang.String ctorArg)
className
- the name of the class for the udfctorArg
- the argument to pass the constructor for the above class.
Constructors can only take strings.public FuncSpec(java.lang.String className, java.lang.String[] ctorArgs)
className
- the name of the class for the udfctorArgs
- the arguments to pass to the constructor for the above class.
Constructors can only take strings.public FuncSpec(java.lang.String className, java.lang.String[] ctorArgs, Schema inputArgsSchema)
className
- the name of the class for the udfctorArgs
- the arguments to pass to the constructor for the above class.
Constructors can only take strings.inputArgsSchema
- schema for input args taken by this Functionpublic FuncSpec(java.lang.String funcSpec)
funcSpec
- the name of the function and any arguments.
It should have the form: classname('arg1', 'arg2', ...)public FuncSpec(java.lang.String funcSpec, Schema inputArgsSchema)
funcSpec
- funcSpec the name of the function and any arguments.
It should have the form: classname('arg1', 'arg2', ...)inputArgsSchema
- schema for input args taken by this Functionpublic static java.lang.String getClassNameFromSpec(java.lang.String funcSpec)
public static java.lang.String getArgStringFromSpec(java.lang.String funcSpec)
public static java.util.List<java.lang.String> parseArguments(java.lang.String argString)
argString
- should be of the form "'arg1', 'arg2', ..."public java.lang.String getClassName()
public void setClassName(java.lang.String className)
className
- the className to setpublic java.lang.String[] getCtorArgs()
public void setCtorArgs(java.lang.String[] ctorArgs)
ctorArgs
- the ctorArgs to setpublic java.lang.String toString()
toString
in class java.lang.Object
public Schema getInputArgsSchema()
public void setInputArgsSchema(Schema inputArgsSchema)
inputArgsSchema
- the inputArgsSchema to setpublic boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public FuncSpec clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
Copyright © 2007-2017 The Apache Software Foundation