anchor.diff:      | d=deleteStatement  { $statement = std::move(d); }
       ;
   
  -#if 0
  -createAggregateStatement returns [CreateAggregateStatement expr]
  -    @init {
  -        boolean orReplace = false;
  -        boolean ifNotExists = false;
  -
  -        List<CQL3Type.Raw> argsTypes = new ArrayList<>();
  -    }
  -    : K_CREATE (K_OR K_REPLACE { orReplace = true; })?
  +dropAggregateStatement returns [std::unique_ptr<cql3::statements::drop_aggregate_statement> expr]
  +    @init {
  +        bool if_exists = false;
  +        std::vector<shared_ptr<cql3_type::raw>> arg_types;
  +        bool args_present = false;
  +    }
  +    : K_DROP K_AGGREGATE
  +      (K_IF K_EXISTS { if_exists = true; } )?
  +      fn=functionName
  +      (
  +        '('
  +          (
  +            v=comparatorType { arg_types.push_back(v); }
  +            ( ',' v=comparatorType { arg_types.push_back(v); } )*
  +          )?
  +        ')'
  +        { args_present = true; }
  +      )?
  +      { $expr = std::make_unique<cql3::statements::drop_aggregate_statement>(std::move(fn), std::move(arg_types), args_present, if_exists); }
  +    ;
  +
  +createAggregateStatement returns [std::unique_ptr<cql3::statements::create_aggregate_statement> expr]
  +    @init {
  +        bool or_replace = false;
  +        bool if_not_exists = false;
  +
  +        std::vector<shared_ptr<cql3_type::raw>> arg_types;
  +    }
  +    : K_CREATE (K_OR K_REPLACE { or_replace = true; })?
         K_AGGREGATE
  -      (K_IF K_NOT K_EXISTS { ifNotExists = true; })?
  +      (K_IF K_NOT K_EXISTS { if_not_exists = true; })?
         fn=functionName
         '('
           (
  -          v=comparatorType { argsTypes.add(v); }
  -          ( ',' v=comparatorType { argsTypes.add(v); } )*
  +          v=comparatorType { arg_types.push_back(v); }
  +          ( ',' v=comparatorType { arg_types.push_back(v); } )*
           )?
         ')'
         K_SFUNC sfunc = allowedFunctionName
  
positive.code:       (
          K_INITCOND ival = term
        )?
        { $expr = new CreateAggregateStatement(fn, argsTypes, sfunc, stype, ffunc, ival, orReplace, ifNotExists); }
      ;
  
  dropAggregateStatement returns [DropAggregateStatement expr]
      @init {
          boolean ifExists = false;
          List<CQL3Type.Raw> argsTypes = new ArrayList<>();
          boolean argsPresent = false;
      }
      : K_DROP K_AGGREGATE
        (K_IF K_EXISTS { ifExists = true; } )?
        fn=functionName
        (
          '('
            (
              v=comparatorType { argsTypes.add(v); }
              ( ',' v=comparatorType { argsTypes.add(v); } )*
            )?
          ')'
          { argsPresent = true; }
        )?
        { $expr = new DropAggregateStatement(fn, argsTypes, argsPresent, ifExists); }
      ;
  #endif
  
  createFunctionStatement returns [std::unique_ptr<cql3::statements::create_function_statement> expr]
      @init {
  
negative.code: #include "cql3/statements/create_view_statement.hh"
  #include "cql3/statements/create_type_statement.hh"
  #include "cql3/statements/create_function_statement.hh"
  #include "cql3/statements/create_aggregate_statement.hh"
  #include "cql3/statements/create_service_level_statement.hh"
  #include "cql3/statements/sl_prop_defs.hh"
  #include "cql3/statements/attach_service_level_statement.hh"
  