Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

filter_empty and columns=() #153

Open
lelit opened this Issue · 1 comment

2 participants

Emanuele Gaifas Tyler Hobbs
Emanuele Gaifas

In ancient versions of pycassa (that is, before 1.3), the simplest idiom to get just a list of all keys of a column family was

for key, _ in cf.get_range(columns=()):
    do_something_with_key(key)

Since 1.3 the get_range() method accepts a filter_empty keyword, True by default, that just caused half-an-hour of headscratching, because the above snippet clearly does nothing...

Not a serious issue, once I understood what's going on... but I wonder if giving an empty columns should take precedence over the filter_empty.

Alternatively, should ColumnFamily grow a more specialized get_keys() method?

Tyler Hobbs
Owner

Actually, those both sound like good ideas to me. I think we should do both.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.