Skip to content

Commit

Permalink
Removing INVALID_TO_ZERO form legacy.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
kaskranenburgQ committed Apr 9, 2024
1 parent e5ca059 commit 2bbbd2b
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions app/models/gql/runtime/functions/legacy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,6 @@ def EXCLUDE(first, last)
first.flatten - last.flatten
end

def INVALID_TO_ZERO(*values)
is_invalid = Proc.new {|v| v.nil? || (v.respond_to?(:nan?) && v.nan?) }

if values.respond_to?(:map)
values.tap(&:flatten!).map!{|v| is_invalid.call(v) ? 0 : v }
values
else
is_invalid.call(values) ? 0 : values
end
end

def MAX(*values)
flatten_compact(values).max
end
Expand Down

0 comments on commit 2bbbd2b

Please sign in to comment.