ibis
ibis copied to clipboard
feat: make `name` param optional to create_table()
Sometimes, I just need to load some temp data into a backend, but I don't care what the table name is. now conn.create_table(obj=data, temp=True) is a nice short way to do that.
Any reason you can't use ibis.memtable for this?
Yes, if obj already is a memtable. .cache() on it doesn't work because you can't choose the backend.
I'm not sure we ever discussed this, but what about a con.memtable method, allowing you to choose which backend a memtable goes into, which would allow .cache() to make sense.
Instead of con.memtable(obj), I would rather just do conn.create_table(obj, temp=True), which I think is more explicit and more familiar.
I think one of the best features of memtables is that they are not bound to a backend. One of the uses for this is in tests. Eg define a memtable with some test data and then create temp tables for this in several different backends (eg to ensure that the feature works across backends).