Cassandra\SchemaMetadataIntegrationTest::createUserDefinedAggregate PHP Method

createUserDefinedAggregate() protected method

Create the user defined aggregate and two user defined functions for the associated aggregate
    protected function createUserDefinedAggregate()
    {
        // Ensure the UDF has been created
        $this->createUserDefinedFunction();
        // Create the UDA
        $statement = new SimpleStatement("CREATE OR REPLACE FUNCTION uda_udf_final(val int) " . "RETURNS NULL ON NULL INPUT " . "RETURNS int LANGUAGE javascript AS 'val * val'");
        $this->session->execute($statement);
        $statement = new SimpleStatement("CREATE OR REPLACE AGGREGATE user_defined_aggregate(int) " . "SFUNC user_defined_function " . "STYPE int " . "FINALFUNC uda_udf_final " . "INITCOND 0");
        $this->session->execute($statement);
    }