public final class org.apache.cassandra.cql3.statements.CreateFunctionStatement extends org.apache.cassandra.cql3.statements.SchemaAlteringStatement
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.apache.cassandra.cql3.statements.CreateFunctionStatement
super_class: org.apache.cassandra.cql3.statements.SchemaAlteringStatement
{
private final boolean orReplace;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean ifNotExists;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private org.apache.cassandra.cql3.functions.FunctionName functionName;
descriptor: Lorg/apache/cassandra/cql3/functions/FunctionName;
flags: (0x0002) ACC_PRIVATE
private final java.lang.String language;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.lang.String body;
descriptor: Ljava/lang/String;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final java.util.List<org.apache.cassandra.cql3.ColumnIdentifier> argNames;
descriptor: Ljava/util/List;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/List<Lorg/apache/cassandra/cql3/ColumnIdentifier;>;
private final java.util.List<org.apache.cassandra.cql3.CQL3Type$Raw> argRawTypes;
descriptor: Ljava/util/List;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
Signature: Ljava/util/List<Lorg/apache/cassandra/cql3/CQL3Type$Raw;>;
private final org.apache.cassandra.cql3.CQL3Type$Raw rawReturnType;
descriptor: Lorg/apache/cassandra/cql3/CQL3Type$Raw;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final boolean calledOnNullInput;
descriptor: Z
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private java.util.List<org.apache.cassandra.db.marshal.AbstractType<?>> argTypes;
descriptor: Ljava/util/List;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/util/List<Lorg/apache/cassandra/db/marshal/AbstractType<*>;>;
private org.apache.cassandra.db.marshal.AbstractType<?> returnType;
descriptor: Lorg/apache/cassandra/db/marshal/AbstractType;
flags: (0x0002) ACC_PRIVATE
Signature: Lorg/apache/cassandra/db/marshal/AbstractType<*>;
public void <init>(org.apache.cassandra.cql3.functions.FunctionName, java.lang.String, java.lang.String, java.util.List<org.apache.cassandra.cql3.ColumnIdentifier>, java.util.List<org.apache.cassandra.cql3.CQL3Type$Raw>, org.apache.cassandra.cql3.CQL3Type$Raw, boolean, boolean, );
descriptor: (Lorg/apache/cassandra/cql3/functions/FunctionName;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;Ljava/util/List;Lorg/apache/cassandra/cql3/CQL3Type$Raw;ZZZ)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=10, args_size=10
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 start local 6 start local 7 start local 8 start local 9 0: aload 0
invokespecial org.apache.cassandra.cql3.statements.SchemaAlteringStatement.<init>:()V
1: aload 0
aload 1
putfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
2: aload 0
aload 2
putfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.language:Ljava/lang/String;
3: aload 0
aload 3
putfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.body:Ljava/lang/String;
4: aload 0
aload 4
putfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.argNames:Ljava/util/List;
5: aload 0
aload 5
putfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.argRawTypes:Ljava/util/List;
6: aload 0
aload 6
putfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.rawReturnType:Lorg/apache/cassandra/cql3/CQL3Type$Raw;
7: aload 0
iload 7
putfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.calledOnNullInput:Z
8: aload 0
iload 8
putfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.orReplace:Z
9: aload 0
iload 9
putfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.ifNotExists:Z
10: return
end local 9 end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/apache/cassandra/cql3/statements/CreateFunctionStatement;
0 11 1 functionName Lorg/apache/cassandra/cql3/functions/FunctionName;
0 11 2 language Ljava/lang/String;
0 11 3 body Ljava/lang/String;
0 11 4 argNames Ljava/util/List<Lorg/apache/cassandra/cql3/ColumnIdentifier;>;
0 11 5 argRawTypes Ljava/util/List<Lorg/apache/cassandra/cql3/CQL3Type$Raw;>;
0 11 6 rawReturnType Lorg/apache/cassandra/cql3/CQL3Type$Raw;
0 11 7 calledOnNullInput Z
0 11 8 orReplace Z
0 11 9 ifNotExists Z
Signature: (Lorg/apache/cassandra/cql3/functions/FunctionName;Ljava/lang/String;Ljava/lang/String;Ljava/util/List<Lorg/apache/cassandra/cql3/ColumnIdentifier;>;Ljava/util/List<Lorg/apache/cassandra/cql3/CQL3Type$Raw;>;Lorg/apache/cassandra/cql3/CQL3Type$Raw;ZZZ)V
MethodParameters:
Name Flags
functionName
language
body
argNames
argRawTypes
rawReturnType
calledOnNullInput
orReplace
ifNotExists
public org.apache.cassandra.cql3.statements.ParsedStatement$Prepared prepare(org.apache.cassandra.service.ClientState);
descriptor: (Lorg/apache/cassandra/service/ClientState;)Lorg/apache/cassandra/cql3/statements/ParsedStatement$Prepared;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=4, args_size=2
start local 0 start local 1 0: new java.util.HashSet
dup
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.argNames:Ljava/util/List;
invokespecial java.util.HashSet.<init>:(Ljava/util/Collection;)V
invokevirtual java.util.HashSet.size:()I
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.argNames:Ljava/util/List;
invokeinterface java.util.List.size:()I
if_icmpeq 4
1: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "duplicate argument names for given function %s with argument names %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
2: aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
aastore
dup
iconst_1
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.argNames:Ljava/util/List;
aastore
3: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
new java.util.ArrayList
dup
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.argRawTypes:Ljava/util/List;
invokeinterface java.util.List.size:()I
invokespecial java.util.ArrayList.<init>:(I)V
putfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.argTypes:Ljava/util/List;
5: aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.argRawTypes:Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 3
goto 8
StackMap locals: org.apache.cassandra.cql3.statements.CreateFunctionStatement org.apache.cassandra.service.ClientState top java.util.Iterator
StackMap stack:
6: aload 3
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast org.apache.cassandra.cql3.CQL3Type$Raw
astore 2
start local 2 7: aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.argTypes:Ljava/util/List;
aload 0
ldc "arguments"
aload 2
invokevirtual org.apache.cassandra.cql3.statements.CreateFunctionStatement.prepareType:(Ljava/lang/String;Lorg/apache/cassandra/cql3/CQL3Type$Raw;)Lorg/apache/cassandra/db/marshal/AbstractType;
invokeinterface java.util.List.add:(Ljava/lang/Object;)Z
pop
end local 2 8: StackMap locals:
StackMap stack:
aload 3
invokeinterface java.util.Iterator.hasNext:()Z
ifne 6
9: aload 0
aload 0
ldc "return type"
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.rawReturnType:Lorg/apache/cassandra/cql3/CQL3Type$Raw;
invokevirtual org.apache.cassandra.cql3.statements.CreateFunctionStatement.prepareType:(Ljava/lang/String;Lorg/apache/cassandra/cql3/CQL3Type$Raw;)Lorg/apache/cassandra/db/marshal/AbstractType;
putfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.returnType:Lorg/apache/cassandra/db/marshal/AbstractType;
10: aload 0
aload 1
invokespecial org.apache.cassandra.cql3.statements.SchemaAlteringStatement.prepare:(Lorg/apache/cassandra/service/ClientState;)Lorg/apache/cassandra/cql3/statements/ParsedStatement$Prepared;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/apache/cassandra/cql3/statements/CreateFunctionStatement;
0 11 1 clientState Lorg/apache/cassandra/service/ClientState;
7 8 2 rawType Lorg/apache/cassandra/cql3/CQL3Type$Raw;
Exceptions:
throws org.apache.cassandra.exceptions.InvalidRequestException
MethodParameters:
Name Flags
clientState
public void prepareKeyspace(org.apache.cassandra.service.ClientState);
descriptor: (Lorg/apache/cassandra/service/ClientState;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
invokevirtual org.apache.cassandra.cql3.functions.FunctionName.hasKeyspace:()Z
ifne 2
aload 1
invokevirtual org.apache.cassandra.service.ClientState.getRawKeyspace:()Ljava/lang/String;
ifnull 2
1: aload 0
new org.apache.cassandra.cql3.functions.FunctionName
dup
aload 1
invokevirtual org.apache.cassandra.service.ClientState.getRawKeyspace:()Ljava/lang/String;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
getfield org.apache.cassandra.cql3.functions.FunctionName.name:Ljava/lang/String;
invokespecial org.apache.cassandra.cql3.functions.FunctionName.<init>:(Ljava/lang/String;Ljava/lang/String;)V
putfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
2: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
invokevirtual org.apache.cassandra.cql3.functions.FunctionName.hasKeyspace:()Z
ifne 4
3: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Functions must be fully qualified with a keyspace name if a keyspace is not set for the session"
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
getfield org.apache.cassandra.cql3.functions.FunctionName.keyspace:Ljava/lang/String;
invokestatic org.apache.cassandra.thrift.ThriftValidation.validateKeyspaceNotSystem:(Ljava/lang/String;)V
5: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/cassandra/cql3/statements/CreateFunctionStatement;
0 6 1 state Lorg/apache/cassandra/service/ClientState;
Exceptions:
throws org.apache.cassandra.exceptions.InvalidRequestException
MethodParameters:
Name Flags
state
protected void grantPermissionsToCreator(org.apache.cassandra.service.QueryState);
descriptor: (Lorg/apache/cassandra/service/QueryState;)V
flags: (0x0004) ACC_PROTECTED
Code:
stack=5, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
getfield org.apache.cassandra.cql3.functions.FunctionName.keyspace:Ljava/lang/String;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
getfield org.apache.cassandra.cql3.functions.FunctionName.name:Ljava/lang/String;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.argTypes:Ljava/util/List;
invokestatic org.apache.cassandra.auth.FunctionResource.function:(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)Lorg/apache/cassandra/auth/FunctionResource;
astore 2
start local 2 1: invokestatic org.apache.cassandra.config.DatabaseDescriptor.getAuthorizer:()Lorg/apache/cassandra/auth/IAuthorizer;
getstatic org.apache.cassandra.auth.AuthenticatedUser.SYSTEM_USER:Lorg/apache/cassandra/auth/AuthenticatedUser;
2: aload 2
invokeinterface org.apache.cassandra.auth.IResource.applicablePermissions:()Ljava/util/Set;
3: aload 2
4: aload 1
invokevirtual org.apache.cassandra.service.QueryState.getClientState:()Lorg/apache/cassandra/service/ClientState;
invokevirtual org.apache.cassandra.service.ClientState.getUser:()Lorg/apache/cassandra/auth/AuthenticatedUser;
invokevirtual org.apache.cassandra.auth.AuthenticatedUser.getName:()Ljava/lang/String;
invokestatic org.apache.cassandra.auth.RoleResource.role:(Ljava/lang/String;)Lorg/apache/cassandra/auth/RoleResource;
5: invokeinterface org.apache.cassandra.auth.IAuthorizer.grant:(Lorg/apache/cassandra/auth/AuthenticatedUser;Ljava/util/Set;Lorg/apache/cassandra/auth/IResource;Lorg/apache/cassandra/auth/RoleResource;)V
end local 2 6: goto 9
7: StackMap locals:
StackMap stack: org.apache.cassandra.exceptions.RequestExecutionException
astore 2
start local 2 8: new java.lang.RuntimeException
dup
aload 2
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 2 9: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 this Lorg/apache/cassandra/cql3/statements/CreateFunctionStatement;
0 10 1 state Lorg/apache/cassandra/service/QueryState;
1 6 2 resource Lorg/apache/cassandra/auth/IResource;
8 9 2 e Lorg/apache/cassandra/exceptions/RequestExecutionException;
Exception table:
from to target type
0 6 7 Class org.apache.cassandra.exceptions.RequestExecutionException
MethodParameters:
Name Flags
state
public void checkAccess(org.apache.cassandra.service.ClientState);
descriptor: (Lorg/apache/cassandra/service/ClientState;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=2, args_size=2
start local 0 start local 1 0: getstatic org.apache.cassandra.config.Schema.instance:Lorg/apache/cassandra/config/Schema;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.argTypes:Ljava/util/List;
invokevirtual org.apache.cassandra.config.Schema.findFunction:(Lorg/apache/cassandra/cql3/functions/FunctionName;Ljava/util/List;)Ljava/util/Optional;
invokevirtual java.util.Optional.isPresent:()Z
ifeq 6
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.orReplace:Z
ifeq 6
1: aload 1
getstatic org.apache.cassandra.auth.Permission.ALTER:Lorg/apache/cassandra/auth/Permission;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
getfield org.apache.cassandra.cql3.functions.FunctionName.keyspace:Ljava/lang/String;
2: aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
getfield org.apache.cassandra.cql3.functions.FunctionName.name:Ljava/lang/String;
3: aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.argTypes:Ljava/util/List;
4: invokestatic org.apache.cassandra.auth.FunctionResource.function:(Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)Lorg/apache/cassandra/auth/FunctionResource;
invokevirtual org.apache.cassandra.service.ClientState.ensureHasPermission:(Lorg/apache/cassandra/auth/Permission;Lorg/apache/cassandra/auth/IResource;)V
5: goto 7
6: StackMap locals:
StackMap stack:
aload 1
getstatic org.apache.cassandra.auth.Permission.CREATE:Lorg/apache/cassandra/auth/Permission;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
getfield org.apache.cassandra.cql3.functions.FunctionName.keyspace:Ljava/lang/String;
invokestatic org.apache.cassandra.auth.FunctionResource.keyspace:(Ljava/lang/String;)Lorg/apache/cassandra/auth/FunctionResource;
invokevirtual org.apache.cassandra.service.ClientState.ensureHasPermission:(Lorg/apache/cassandra/auth/Permission;Lorg/apache/cassandra/auth/IResource;)V
7: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 this Lorg/apache/cassandra/cql3/statements/CreateFunctionStatement;
0 8 1 state Lorg/apache/cassandra/service/ClientState;
Exceptions:
throws org.apache.cassandra.exceptions.UnauthorizedException, org.apache.cassandra.exceptions.InvalidRequestException
MethodParameters:
Name Flags
state
public void validate(org.apache.cassandra.service.ClientState);
descriptor: (Lorg/apache/cassandra/service/ClientState;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.language:Ljava/lang/String;
invokestatic org.apache.cassandra.cql3.functions.UDFunction.assertUdfsEnabled:(Ljava/lang/String;)V
1: aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.ifNotExists:Z
ifeq 3
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.orReplace:Z
ifeq 3
2: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Cannot use both 'OR REPLACE' and 'IF NOT EXISTS' directives"
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
3: StackMap locals:
StackMap stack:
getstatic org.apache.cassandra.config.Schema.instance:Lorg/apache/cassandra/config/Schema;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
getfield org.apache.cassandra.cql3.functions.FunctionName.keyspace:Ljava/lang/String;
invokevirtual org.apache.cassandra.config.Schema.getKSMetaData:(Ljava/lang/String;)Lorg/apache/cassandra/schema/KeyspaceMetadata;
ifnonnull 5
4: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Cannot add function '%s' to non existing keyspace '%s'."
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
getfield org.apache.cassandra.cql3.functions.FunctionName.name:Ljava/lang/String;
aastore
dup
iconst_1
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
getfield org.apache.cassandra.cql3.functions.FunctionName.keyspace:Ljava/lang/String;
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
5: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/cassandra/cql3/statements/CreateFunctionStatement;
0 6 1 state Lorg/apache/cassandra/service/ClientState;
Exceptions:
throws org.apache.cassandra.exceptions.InvalidRequestException
MethodParameters:
Name Flags
state
public org.apache.cassandra.transport.Event$SchemaChange announceMigration(org.apache.cassandra.service.QueryState, boolean);
descriptor: (Lorg/apache/cassandra/service/QueryState;Z)Lorg/apache/cassandra/transport/Event$SchemaChange;
flags: (0x0001) ACC_PUBLIC
Code:
stack=7, locals=6, args_size=3
start local 0 start local 1 start local 2 0: getstatic org.apache.cassandra.config.Schema.instance:Lorg/apache/cassandra/config/Schema;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.argTypes:Ljava/util/List;
invokevirtual org.apache.cassandra.config.Schema.findFunction:(Lorg/apache/cassandra/cql3/functions/FunctionName;Ljava/util/List;)Ljava/util/Optional;
aconst_null
invokevirtual java.util.Optional.orElse:(Ljava/lang/Object;)Ljava/lang/Object;
checkcast org.apache.cassandra.cql3.functions.Function
astore 3
start local 3 1: aload 3
ifnull 2
iconst_1
goto 3
StackMap locals: org.apache.cassandra.cql3.functions.Function
StackMap stack:
2: iconst_0
StackMap locals:
StackMap stack: int
3: istore 4
start local 4 4: iload 4
ifeq 21
5: aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.ifNotExists:Z
ifeq 7
6: aconst_null
areturn
7: StackMap locals: int
StackMap stack:
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.orReplace:Z
ifne 9
8: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Function %s already exists"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 3
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
9: StackMap locals:
StackMap stack:
aload 3
instanceof org.apache.cassandra.cql3.functions.ScalarFunction
ifne 11
10: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Function %s can only replace a function"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 3
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
11: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.calledOnNullInput:Z
aload 3
checkcast org.apache.cassandra.cql3.functions.ScalarFunction
invokeinterface org.apache.cassandra.cql3.functions.ScalarFunction.isCalledOnNullInput:()Z
if_icmpeq 17
12: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Function %s can only be replaced with %s"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 3
aastore
dup
iconst_1
13: aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.calledOnNullInput:Z
ifeq 14
ldc "CALLED ON NULL INPUT"
goto 15
StackMap locals: org.apache.cassandra.cql3.statements.CreateFunctionStatement org.apache.cassandra.service.QueryState int org.apache.cassandra.cql3.functions.Function int
StackMap stack: new 12 new 12 java.lang.String java.lang.Object[] java.lang.Object[] int
14: ldc "RETURNS NULL ON NULL INPUT"
StackMap locals: org.apache.cassandra.cql3.statements.CreateFunctionStatement org.apache.cassandra.service.QueryState int org.apache.cassandra.cql3.functions.Function int
StackMap stack: new 12 new 12 java.lang.String java.lang.Object[] java.lang.Object[] int java.lang.String
15: aastore
16: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
17: StackMap locals:
StackMap stack:
aload 3
invokeinterface org.apache.cassandra.cql3.functions.Function.returnType:()Lorg/apache/cassandra/db/marshal/AbstractType;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.returnType:Lorg/apache/cassandra/db/marshal/AbstractType;
invokestatic org.apache.cassandra.schema.Functions.typesMatch:(Lorg/apache/cassandra/db/marshal/AbstractType;Lorg/apache/cassandra/db/marshal/AbstractType;)Z
ifne 21
18: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "Cannot replace function %s, the new return type %s is not compatible with the return type %s of existing function"
iconst_3
anewarray java.lang.Object
dup
iconst_0
19: aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
aastore
dup
iconst_1
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.returnType:Lorg/apache/cassandra/db/marshal/AbstractType;
invokevirtual org.apache.cassandra.db.marshal.AbstractType.asCQL3Type:()Lorg/apache/cassandra/cql3/CQL3Type;
aastore
dup
iconst_2
aload 3
invokeinterface org.apache.cassandra.cql3.functions.Function.returnType:()Lorg/apache/cassandra/db/marshal/AbstractType;
invokevirtual org.apache.cassandra.db.marshal.AbstractType.asCQL3Type:()Lorg/apache/cassandra/cql3/CQL3Type;
aastore
20: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
21: StackMap locals:
StackMap stack:
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.argNames:Ljava/util/List;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.argTypes:Ljava/util/List;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.returnType:Lorg/apache/cassandra/db/marshal/AbstractType;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.calledOnNullInput:Z
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.language:Ljava/lang/String;
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.body:Ljava/lang/String;
invokestatic org.apache.cassandra.cql3.functions.UDFunction.create:(Lorg/apache/cassandra/cql3/functions/FunctionName;Ljava/util/List;Ljava/util/List;Lorg/apache/cassandra/db/marshal/AbstractType;ZLjava/lang/String;Ljava/lang/String;)Lorg/apache/cassandra/cql3/functions/UDFunction;
astore 5
start local 5 22: aload 5
iload 2
invokestatic org.apache.cassandra.service.MigrationManager.announceNewFunction:(Lorg/apache/cassandra/cql3/functions/UDFunction;Z)V
23: new org.apache.cassandra.transport.Event$SchemaChange
dup
iload 4
ifeq 24
getstatic org.apache.cassandra.transport.Event$SchemaChange$Change.UPDATED:Lorg/apache/cassandra/transport/Event$SchemaChange$Change;
goto 25
StackMap locals: org.apache.cassandra.cql3.statements.CreateFunctionStatement org.apache.cassandra.service.QueryState int org.apache.cassandra.cql3.functions.Function int org.apache.cassandra.cql3.functions.UDFunction
StackMap stack: new 23 new 23
24: getstatic org.apache.cassandra.transport.Event$SchemaChange$Change.CREATED:Lorg/apache/cassandra/transport/Event$SchemaChange$Change;
25: StackMap locals: org.apache.cassandra.cql3.statements.CreateFunctionStatement org.apache.cassandra.service.QueryState int org.apache.cassandra.cql3.functions.Function int org.apache.cassandra.cql3.functions.UDFunction
StackMap stack: new 23 new 23 org.apache.cassandra.transport.Event$SchemaChange$Change
getstatic org.apache.cassandra.transport.Event$SchemaChange$Target.FUNCTION:Lorg/apache/cassandra/transport/Event$SchemaChange$Target;
26: aload 5
invokevirtual org.apache.cassandra.cql3.functions.UDFunction.name:()Lorg/apache/cassandra/cql3/functions/FunctionName;
getfield org.apache.cassandra.cql3.functions.FunctionName.keyspace:Ljava/lang/String;
aload 5
invokevirtual org.apache.cassandra.cql3.functions.UDFunction.name:()Lorg/apache/cassandra/cql3/functions/FunctionName;
getfield org.apache.cassandra.cql3.functions.FunctionName.name:Ljava/lang/String;
aload 5
invokevirtual org.apache.cassandra.cql3.functions.UDFunction.argTypes:()Ljava/util/List;
invokestatic org.apache.cassandra.db.marshal.AbstractType.asCQLTypeStringList:(Ljava/util/List;)Ljava/util/List;
27: invokespecial org.apache.cassandra.transport.Event$SchemaChange.<init>:(Lorg/apache/cassandra/transport/Event$SchemaChange$Change;Lorg/apache/cassandra/transport/Event$SchemaChange$Target;Ljava/lang/String;Ljava/lang/String;Ljava/util/List;)V
areturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 28 0 this Lorg/apache/cassandra/cql3/statements/CreateFunctionStatement;
0 28 1 queryState Lorg/apache/cassandra/service/QueryState;
0 28 2 isLocalOnly Z
1 28 3 old Lorg/apache/cassandra/cql3/functions/Function;
4 28 4 replaced Z
22 28 5 udFunction Lorg/apache/cassandra/cql3/functions/UDFunction;
Exceptions:
throws org.apache.cassandra.exceptions.RequestValidationException
MethodParameters:
Name Flags
queryState
isLocalOnly
private org.apache.cassandra.db.marshal.AbstractType<?> prepareType(java.lang.String, org.apache.cassandra.cql3.CQL3Type$Raw);
descriptor: (Ljava/lang/String;Lorg/apache/cassandra/cql3/CQL3Type$Raw;)Lorg/apache/cassandra/db/marshal/AbstractType;
flags: (0x0002) ACC_PRIVATE
Code:
stack=7, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 2
invokevirtual org.apache.cassandra.cql3.CQL3Type$Raw.isFrozen:()Z
ifeq 2
1: new org.apache.cassandra.exceptions.InvalidRequestException
dup
ldc "The function %s should not be frozen; remove the frozen<> modifier"
iconst_1
anewarray java.lang.Object
dup
iconst_0
aload 1
aastore
invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokespecial org.apache.cassandra.exceptions.InvalidRequestException.<init>:(Ljava/lang/String;)V
athrow
2: StackMap locals:
StackMap stack:
aload 2
invokevirtual org.apache.cassandra.cql3.CQL3Type$Raw.canBeNonFrozen:()Z
ifne 4
3: aload 2
invokevirtual org.apache.cassandra.cql3.CQL3Type$Raw.freeze:()V
4: StackMap locals:
StackMap stack:
aload 2
aload 0
getfield org.apache.cassandra.cql3.statements.CreateFunctionStatement.functionName:Lorg/apache/cassandra/cql3/functions/FunctionName;
getfield org.apache.cassandra.cql3.functions.FunctionName.keyspace:Ljava/lang/String;
invokevirtual org.apache.cassandra.cql3.CQL3Type$Raw.prepare:(Ljava/lang/String;)Lorg/apache/cassandra/cql3/CQL3Type;
invokeinterface org.apache.cassandra.cql3.CQL3Type.getType:()Lorg/apache/cassandra/db/marshal/AbstractType;
astore 3
start local 3 5: aload 3
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/apache/cassandra/cql3/statements/CreateFunctionStatement;
0 6 1 typeName Ljava/lang/String;
0 6 2 rawType Lorg/apache/cassandra/cql3/CQL3Type$Raw;
5 6 3 type Lorg/apache/cassandra/db/marshal/AbstractType<*>;
Signature: (Ljava/lang/String;Lorg/apache/cassandra/cql3/CQL3Type$Raw;)Lorg/apache/cassandra/db/marshal/AbstractType<*>;
MethodParameters:
Name Flags
typeName
rawType
}
SourceFile: "CreateFunctionStatement.java"
InnerClasses:
public abstract Raw = org.apache.cassandra.cql3.CQL3Type$Raw of org.apache.cassandra.cql3.CQL3Type
public Prepared = org.apache.cassandra.cql3.statements.ParsedStatement$Prepared of org.apache.cassandra.cql3.statements.ParsedStatement
public SchemaChange = org.apache.cassandra.transport.Event$SchemaChange of org.apache.cassandra.transport.Event
public final Change = org.apache.cassandra.transport.Event$SchemaChange$Change of org.apache.cassandra.transport.Event$SchemaChange
public final Target = org.apache.cassandra.transport.Event$SchemaChange$Target of org.apache.cassandra.transport.Event$SchemaChange