Cassandra mock connection is converting all column names to String, this fix preserves the original type #150

Merged
merged 0 commits into from Nov 27, 2013

Projects

None yet

3 participants

@imkirnos

No description provided.

@ryanking ryanking and 1 other commented on an outdated diff Jul 11, 2012
lib/cassandra/mock.rb
@@ -449,7 +449,7 @@ def merge_and_sort(old_stuff, new_stuff)
new_stuff = new_stuff.inject({}){|h,k| h[k] = nil; h }
end
- new_stuff = new_stuff.to_a.inject({}){|h,k| h[k[0].to_s] = k[1]; h }
+ new_stuff = new_stuff.to_a.inject({}){|h,k| h[k[0]] = k[1]; h }
@ryanking
ryanking Jul 11, 2012

The prior behavior should match how this library works with a real cassandra cluster. Does it not?

@imkirnos
imkirnos Jul 11, 2012
@imkirnos
imkirnos Jul 11, 2012
@natemueller

I think the 90baff9 approach makes sense. If you make a new branch, cherry-pick that in and add a test case I'll merge it in.

@natemueller natemueller was assigned Jul 22, 2012
@natemueller natemueller merged commit 1355f37 into cassandra-rb:master Nov 27, 2013

1 check passed

Details default The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment