Skip to content
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

Additional generics to support new databases #1177

Closed
piccolbo opened this issue May 28, 2015 · 2 comments
Closed

Additional generics to support new databases #1177

piccolbo opened this issue May 28, 2015 · 2 comments
Labels
Milestone

Comments

@piccolbo
Copy link

@piccolbo piccolbo commented May 28, 2015

Related to #1163 , I found myself to have to write some methods from scratch to support sparkSQL (see @RevolutionAnalytics/dplyr.spark) that do what methods for other databases do with minor variations. I am not sure it's feasible nor urgent to provide some intermediate layer of abstraction, but I thought I'd list them here since it seems bad from a code reuse standpoint and maybe supporting new DBs could be made simpler.

-db_explain doesn't have a DBIConnection method. The method for MySQLConnection works. I suspect that's standard SQL and should become a DBIConnection method
-db_insert_into: very minor difference between hiveql and mysql here, only the file separator and reserved word INPATH vs INFILE. I would suggest a sql_join generic instead of hardcoding the sql in this method and for the file input, I am not sure what I would do
-sql_join: only the DBIConnection method exists. Differences between this and hiveql are: extension to unique col names; ON syntax with fully qualified names instead of USING; add a class "join" to the return type; don't nest the sql inside of a SELECT * FROM. I still have problems with duplicated columns, so the list is not be complete

@hadley hadley added this to the 0.5 milestone Aug 24, 2015
@hadley hadley added the feature label Aug 24, 2015
@hadley
Copy link
Member

@hadley hadley commented Aug 24, 2015

Thanks! I'm planning on a small dplyr release by the end of the week, and a bigger one in a couple of months. I'll work on this then.

Loading

@hadley hadley added the SQL label Oct 22, 2015
hadley added a commit that referenced this issue Mar 10, 2016
@hadley
Copy link
Member

@hadley hadley commented Mar 10, 2016

  • db_explain() now does what you expect - thanks!
  • db_insert_into(), I think it's better to fix this at the DBI level
  • sql_join(): I think you'll need to do what you want in your method. Making sql_join() more flexible is going to be tricky, and as you can tell by how long it took me to respond to this issue, relying on me is likely to create a bottleneck.

Loading

@hadley hadley closed this Mar 10, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Jun 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants