Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't insert nil values #8

Closed
timhaines opened this issue Jan 18, 2010 · 4 comments
Closed

Can't insert nil values #8

timhaines opened this issue Jan 18, 2010 · 4 comments

Comments

@timhaines
Copy link

Have a column family with super columns. Trying to create columns with tweet ids as the key, and nil as the value. I get an error on .insert.

"Required field value is unset!"

Exception is raised from the CassandraThrift Column class's validate method
at Line 42 in vendor/gen-rb/cassandra_types.rb

@ryanking
Copy link
Contributor

Can you paste some actual code?

@timhaines
Copy link
Author

>script/console 
Loading development environment (Rails 2.3.5)
>>  @cassandra =  Cassandra.new('Favstar')
=> #<Cassandra:20994830, @keyspace="Favstar", @schema={}, @servers=["127.0.0.1:9160"]>
>> @cassandra.insert(:GroupVectors, "row_key", {"super_column_key" => {20 => nil} })
Thrift::ProtocolException: Required field value is unset!
    from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/cassandra-0.7.1/lib/../vendor/gen-rb/cassandra_types.rb:42:in `validate'
    from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/thrift-0.0.810255.1/lib/thrift/client.rb:35:in `write'
    from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/thrift-0.0.810255.1/lib/thrift/client.rb:35:in `send_message'
    from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/cassandra-0.7.1/lib/../vendor/gen-rb/cassandra.rb:165:in `send_batch_insert'
    from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/cassandra-0.7.1/lib/../vendor/gen-rb/cassandra.rb:160:in `batch_insert'
    from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/thrift_client-0.3.2/lib/thrift_client.rb:125:in `send'
    from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/thrift_client-0.3.2/lib/thrift_client.rb:125:in `proxy'
    from (eval):1:in `batch_insert'
    from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/cassandra-0.7.1/lib/cassandra/protocol.rb:8:in `_insert'
    from /opt/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/cassandra-0.7.1/lib/cassandra/cassandra.rb:109:in `insert'
    from (irb):2

@ryanking
Copy link
Contributor

thanks. i'll dig into it as soon as I can.

@ryanking
Copy link
Contributor

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants