Comments (4)
cross join
does not work in query() functions
Codes like this does not work.
query (' select * from df1 cross join df2 where df1. = df2. ')
from tidyquery.
In the version of dplyr currently on CRAN, it is possible to do a cross join with full_join(..., by = character())
.
dplyr 1.1.0 (due to be submitted in CRAN in late January) will add a cross_join()
function and soft-deprecate the above syntax (tidyverse/dplyr#6612).
I intend to make tidyquery require dplyr >= 1.1.0 and implement a translation of SQL CROSS JOIN
to dplyr cross_join()
.
Update: See my comment below.
queryparser already supports cross joins so this does not require any work there.
from tidyquery.
I intend to make tidyquery require dplyr >= 1.1.0 and implement a translation of SQL
CROSS JOIN
to dplyrcross_join()
.queryparser already supports cross joins so this does not require any work there.
Does it mean CROSS JOIN
will come true in tidyquery after dplyr >= 1.1.0 is released?
from tidyquery.
@antonio-yu I went ahead and added support for cross joins in 537eb35. Please test it out and let me know if it works for you using the version of tidyquery on GitHub: remotes::install_github("ianmcook/tidyquery")
Cross joins should work in tidyquery now as long as you are using dplyr 1.0.0 or higher. I added code that detects what version of dplyr you are using. If are using an old version of dplyr that does not have the cross_join()
function, then it translates SQL cross join to full_join(..., by = character())
. If you are using the new dplyr that has cross_join(),
then it translates to that.
from tidyquery.
Related Issues (20)
- Support disk.frame objects HOT 9
- Support data.table objects through dtplyr HOT 2
- Support SQL-92-style join queries
- Add function show_dplyr() HOT 4
- Simplify dplyr code where possible HOT 1
- Improve support for outer join queries HOT 1
- query() fails when FROM clause refers to object in non-global calling environment
- Add substring_index() function HOT 2
- Add support for fields with spaces in their names when using FROM clause HOT 5
- Support for Subqueries and OVER clauses HOT 1
- Support Arrow Table, RecordBatch, and Dataset objects HOT 1
- Failing test with next version of dtplyr HOT 9
- Do not truncate function arguments in output of `show_dplyr()` HOT 3
- Allow `namespace::object` in `FROM` clause
- Export version number for queryparser HOT 1
- dplyr 1.0.8, rlang 1.0.0 HOT 2
- Cross join not working . HOT 1
- Migrate CI to GitHub Actions HOT 1
- Use new dplyr `join_by()` syntax to represent join conditions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tidyquery.