lib/sparql/algebra/operator/sum.rb in sparql-3.1.6 vs lib/sparql/algebra/operator/sum.rb in sparql-3.1.7

- old
+ new

@@ -20,10 +20,10 @@ # Sum is a SPARQL set function that will return the numeric value obtained by summing the values within the aggregate group. Type promotion happens as per the op:numeric-add function, applied transitively, (see definition below) so the value of SUM(?x), in an aggregate group where ?x has values 1 (integer), 2.0e0 (float), and 3.0 (decimal) will be 6.0 (float). # # @param [Enumerable<Array<RDF::Term>>] enum # enum of evaluated operand # @return [RDF::Literal::Numeric] The sum of the terms - def apply(enum) + def apply(enum, **options) # FIXME: we don't actually do anything with distinct operands.shift if distinct = (operands.first == :distinct) if enum.empty? RDF::Literal(0) elsif enum.flatten.all? {|n| n.is_a?(RDF::Literal::Numeric)}