protected function assertUserDefinedAggregate()
{
// Get the UDA from the current keyspace
$keyspace = $this->session->schema()->keyspace($this->keyspaceName);
$function = $keyspace->aggregate("user_defined_aggregate", Type::int());
$expectedArgumentTypes = array("int");
// Assert the UDA
$this->assertEquals("user_defined_aggregate", $function->simpleName());
$argumentTypes = array();
foreach ($function->argumentTypes() as $argumentType) {
$argumentTypes[] = "{$argumentType}";
}
$this->assertEquals($expectedArgumentTypes, $argumentTypes);
$this->assertUserDefinedFunctionsEqual("user_defined_function", $function->stateFunction());
$this->assertUserDefinedFunctionsEqual("uda_udf_final", $function->finalFunction());
$this->assertEquals(0, $function->initialCondition());
$this->assertEquals("int", $function->stateType());
$this->assertEquals("int", $function->returnType());
$this->assertEquals("user_defined_aggregate(int)", $function->signature());
// Assert the UDFs
$this->assertUserDefinedFunction();
$this->assertAggregateUserDefinedFunction();
}