What I would suggest doing is having one method do everything here, and return the string fields, then have another method that iterates over the fields and returns the operators. You could have a single iterator that you work with:

```ruby
def fields
  properties_with_fields.map(&:last)
end

def operators
  properties_with_fields.map(&:first).grep(DataMapper::Query::Operator)
end

def properties_with_fields
  @query.fields.map do |property|
    case property
    when DataMapper::Query::Operator
      argument = property.target.field
      argument = '*' if argument == :all
      function = property.operator.to_s.upcase
      [ property, "#{function}(#{argument})" ]
    else
      [ property, property.field ]
    end
  end
end
```