-
Notifications
You must be signed in to change notification settings - Fork 603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: RelationError
when relating two scalar values from different relations
#7616
Comments
Do you have a general use case for this? It would be helpful to understand the context in which you're trying to do this. For the query you're showing here you should be able to write t.nunique() == t.count() |
A few ideas that I have had to do:
|
Just to report, this on main now brings up a different error. More specifically a 293 has_unbound = False
294 node_types = (ops.UnboundTable, ops.DatabaseTable, ops.SQLQueryResult)
--> 295 for table in self.op().find(node_types):
296 if isinstance(table, ops.UnboundTable):
297 has_unbound = True
RecursionError: maximum recursion depth exceeded that being said, I'm not sure if this is the expected bug or there is something else going on here. |
The infinite recursion is definitely unintended 😅 |
This is also works as expected now, when using In [13]: t.distinct().count().as_scalar() == t.count().as_scalar()
Out[13]:
┌──────┐
│ True │
└──────┘ xref: #10124 (comment) |
What happened?
I feel like I already filed a bug for this, but I couldn't find it with some searching? Apologies if so. Thanks for the help!
results in
RelationError: Selection expressions don't fully originate from dependencies of the table expression.
t.distinct().count()
andt.count()
are both scalar values, so they should be able to be compared, even though they are coming from different relations. If we were comparing columns, egt.distinct().my_col == t.my_col
, then it makes sense to get this error because how would you "line up" these two columns.What version of ibis are you using?
7.1.0
What backend(s) are you using, if any?
No response
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: