-
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: CompileError: Multiple, unrelated CTEs found
#7350
Comments
Thanks for opening the issue. Would you mind coming up with a reproducer that can be run with only ibis installed and that doesn't require use of a library that depends on ibis? |
yeah makes sense. Trying to minimize the changes I need to make: Are you concerned with some/all of
Thanks! |
Concerned with all of those 😄 How about trying to reproduce without loading and featurizing and trying only steps 3, 4 and 5 in the issue description? |
yes I will do that! |
OK so this is actually quite simple 🤣 import ibis
t = ibis.examples.penguins.fetch()
# No error if you remove the .head() call
t = t.head(100)
# The rename is simply needed so the schemas are the same so the union works
sub1 = t.inner_join(t.view(), "island").mutate(island_right=_.island)
sub2 = t.inner_join(t.view(), "sex").mutate(sex_right=_.sex)
u = ibis.union(sub1, sub2)
u |
Thanks @NickCrews! I can reproduce. This may not make the 7.1 cut, but it'll definitely be in the release following 7.1. |
I'll check #7580 for this and add a test there if it's fixed. |
Turns out this is also fixed by #7580. |
Closing this out as fixed and tested on |
What happened?
EDIT: see below I found a much simpler repro
Ok, sorry I'm not sure what the exact cause of this is. Thanks for the help!
Basically, I
featured
tablefeatured
on condition A to getja
.featured
on condition B to getjb
.If I do NOT .cache
featured
before the joins, then I get the error during the union. If I DO .cachefeatured
before the joins, then there is no error. Regardless of whether I .cache(), I can always .execute()ja
andjb
before the union and it does not error.Exact repro steps :
git clone https://github.com/nickcrews/mismo.git
and CD into that repogit checkout 3105eaf7ef84ad5b629d7ce1177a05dc83469b68
pdm install
./docs/examples/patent_deduplication.ipynb
rules.block(featured, featured)
Let me know how else I can be helpful with debugging this.
What version of ibis are you using?
7.0.0
What backend(s) are you using, if any?
duckdb
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: