bug(backends): unexpected chained join behavior
See original GitHub issueChained joins in pandas backend don’t behave as expected, and yield an error.
MWE:
import ibis
import pandas as pd
test_df1 = pd.DataFrame({
'id': ['1', '1'],
'value': ['a', 'a']
})
test_df2 = pd.DataFrame({
'id': ['1', '1'],
'value': ['z', 'z']
})
test_df3 = pd.DataFrame({
'id': ['1', '1'],
'value': ['z1', 'z1']
})
conn = ibis.pandas.connect({'df1': test_df1,
'df2': test_df2,
'df3': test_df3})
t1 = conn.table('df1')
t2 = conn.table('df2')
t3 = conn.table('df3')
expr1 = t1.join(t2, t1.id == t2.id)
expr2 = t1.join(t2, t1.id == t2.id).join(t3, t1.id == t3.id)
#works
print('\n'+expr1.execute())
#fails
print('\n'+expr2.execute())
Error:
KeyError: PandasTable(name='df1', schema=ibis.Schema {
id string
value string
}, source=<ibis.backends.pandas.Backend object at 0x7f4edbb87e80>)
Does the pandas backend support chained joins / is there a different syntax required than the docs suggest here -> https://ibis-project.org/docs/3.1.0/ibis-for-sql-programmers/?h=left_join#multiple-joins ?
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Issues · ibis-project/ibis · GitHub
bug (backends): unexpected chained join behavior backends Issues related to all backends breaking change Changes that introduce an API break at any level...
Read more >Resolvers - Apollo GraphQL Docs
A resolver is a function that's responsible for populating the data for a single field in your schema. It can populate that data...
Read more >Bug with JOIN ... USING ... - Snowflake Community
There appears to be a bug when using. SELECT * FROM a; JOIN b USING (attribute1). Fist weird thing is that there is...
Read more >5 Most Common useState Mistakes React Developers Often ...
In simpler terms, if any chained object is missing, it doesn't continue with the chain operation (short-circuits). For example, user?.names?.
Read more >The 10 Most Common JavaScript Issues Developers Face
If you need help figuring out why your JavaScript isn't working, consult this list of the 10 most common JavaScript issues from a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In the meantime you should be able to write
Note the
_
, it refers to everything to the left of the secondjoin
call.Interestingly, this appears to be related to overlapping column names in some way:
Not Working
Working