def create_functions
@ddl[:aggregate].each_with_index do |agg, i|
output = agg[:args][0]
if contains_output?(output)
arguments = agg[:args][1]
format = (arguments.delete(:format) if arguments) || nil
begin
@functions << load_function(agg[:function]).new(output, arguments, format, @action)
rescue Exception => e
Log.error("Cannot create aggregate function '#{output}'. #{e.to_s}")
@failed << {:name => output, :type => :startup}
end
else
Log.error("Cannot create aggregate function '#{output}'. '#{output}' has not been specified as a valid ddl output.")
@failed << {:name => output, :type => :create}
end
end
end