twitter/cassandra — Issue #136: multi_get doesn't accept column names
Author: mheffner
Created: 2012-01-19 20:28:03+00:00
State: open

From `lib/cassandra/cassandra.rb`, `multi_get` is documented to support a list of columns:

```
# Multi-key version of Cassandra#get.
#
# This method allows you to select multiple rows with a single query.
# If a key that is passed in doesn't exist an empty hash will be
# returned.
#
# Supports the same parameters as Cassandra#get.
#
# * column_family - The column_family that you are inserting into.
# * keys - An array of keys to select.
# * columns - Either a single super_column or a list of columns.
# * sub_columns - The list of sub_columns to select.
# * options - Valid options are:
# * :count - The number of columns requested to be returned.
# * :start - The starting value for selecting a range of columns.
# * :finish - The final value for selecting a range of columns.
# * :reversed - If set to true the results will be returned in reverse order.
# * :consistency - Uses the default read consistency if none specified.
#
def multi_get(column_family, keys, *columns_and_options)
```

However, I can't seem to pass a list of columns to multi_get. For example:

```ruby
@client.multi_get(CF, ['key1', 'key2'], ['col1', 'col2'], :consistency => Cassandra::Consistency::QUORUM)
```

Dies with: `#`

```
/.bundle/gems/ruby/1.9.1/gems/thrift-0.7.0/lib/thrift/client.rb:35:in `write_string'
/.bundle/gems/ruby/1.9.1/gems/thrift-0.7.0/lib/thrift/client.rb:35:in `write'
/.bundle/gems/ruby/1.9.1/gems/thrift-0.7.0/lib/thrift/client.rb:35:in `send_message'
/.bundle/gems/ruby/1.9.1/gems/cassandra-0.12.1/vendor/0.8/gen-rb/cassandra.rb:107:in `send_multiget_slice'
/.bundle/gems/ruby/1.9.1/gems/cassandra-0.12.1/vendor/0.8/gen-rb/cassandra.rb:102:in `multiget_slice'
```

Running with DEBUG=1 fails while parsing the output with:

```
#

/.bundle/gems/ruby/1.9.1/gems/thrift-0.7.0/lib/thrift/struct_union.rb:160:in `inspect_field'
/.bundle/gems/ruby/1.9.1/gems/thrift-0.7.0/lib/thrift/struct_union.rb:187:in `block in inspect_collection'
/.bundle/gems/ruby/1.9.1/gems/thrift-0.7.0/lib/thrift/struct_union.rb:186:in `each'
/.bundle/gems/ruby/1.9.1/gems/thrift-0.7.0/lib/thrift/struct_union.rb:186:in `inspect_collection'
/.bundle/gems/ruby/1.9.1/gems/thrift-0.7.0/lib/thrift/struct_union.rb:174:in `inspect_field'
```