Skip to content

Commit

Permalink
👕 Use literal instead of unnecessary symbol conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
heronshoes committed Feb 1, 2024
1 parent 7ab2473 commit ba15755
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/red_amber/group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,7 @@ def call_aggregating_function(func, summary_keys, _options)
summary_keys.each.with_object([[], []]) do |key, (keys, arrays)|
vector = @dataframe[key]
arrays << filters.map { |filter| vector.filter(filter).send(func) }
keys << "#{func}(#{key})".to_sym
keys << :"#{func}(#{key})"
rescue Arrow::Error::NotImplemented
# next
end
Expand Down
4 changes: 2 additions & 2 deletions test/test_subframes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ class SubFranesTest < Test::Unit::TestCase
test '#aggregate by block with an Array w/o group key' do
aggregations =
%i[sum count].product(%i[x z]).map do |func, key|
["#{func}_#{key}".to_sym, key, func]
[:"#{func}_#{key}", key, func]
end
aggregated =
@sf.aggregate do |df|
Expand All @@ -399,7 +399,7 @@ class SubFranesTest < Test::Unit::TestCase
test '#aggregate by block with an Array and group key' do
aggregations = [%i[y y first]]
%i[sum count].product(%i[x z]).each do |func, key|
aggregations << ["#{func}_#{key}".to_sym, key, func]
aggregations << [:"#{func}_#{key}", key, func]
end
aggregated =
@sf.aggregate do |df|
Expand Down

0 comments on commit ba15755

Please sign in to comment.