Closed as not planned
Description
What happened?
Not sure what intended behavior is here, but there is a papercut: #10246 makes it sound like we expect anything with a .get_name() to actually work. But I think that all ir.Value
s have a name, but not all ir.Expr
s do:
import ibis
t = ibis.memtable({"x": [1, 2, 3]})
t.get_name() # ibis_pandas_memtable_2ltmalss6jcxvbo57dr753xrky
t.filter(t.x > 1).get_name() # AttributeError: 'Filter' object has no attribute 'name'
t.union(t).get_name() # AttributeError: 'Union' object has no attribute 'name'
t.select("x").get_name() # AttributeError: 'Project' object has no attribute 'name'
I think there are two solutions?
- make ALL
ir.Value
s be named, autogenerating one if not set explicitly, similar toir.Value
s - only support
ir.Value
s being named, and move the method fromir.Expr
toir.Value
, so that users don't get tab completion on this method that can sometimes fail.
Since in the above t.get_name()
works, getting the name of the physical table in the backend, and I think this is useful, I would lean towards 1?
What version of ibis are you using?
main
What backend(s) are you using, if any?
No response
Relevant log output
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Type
Projects
Status
done