-
I want to pass a reference to a column in a function and have that function still be able to access the underlying table. Through this discussion: I ended up concluding that I can access that parent through the following: table.COLUMN_NAME.op().rel.parent.name but this is just the name of the table, not the table object itself. And also it's just unclear to me if this will always work. Any tips? [For context, I'm building a wrapper of ibis for the particular data structure we work with most commonly. I have tables X, Y and Z and the library knows how to join these tables. I want to pass a filter conditions on Y and Z and return rows on X that satisfy (after appropriately joining) the conditions. So I need to be able to go from filter conditions or columns back to source tables. Can give you more details if you'd like.] |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
So |
Beta Was this translation helpful? Give feedback.
.rel
should be sufficient there to get the table operation, and for any operation, you can turn it into an expression by calling.to_expr()
on it.So
table.COLUMN_NAME.op().rel.to_expr()
should I think be what you want.