-
Notifications
You must be signed in to change notification settings - Fork 590
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
Union except and intersect #2845
Comments
|
Maybe not in the docs, but UNION is implemented in Ibis already. |
|
Ahhh I see you implemented intersect and Except separately.! Yeah just discovered it in the code? Sorry! I think this might be broken in Bigquery then but will test and write there separately |
|
Bigquery needs to be adapted to the last changes in Ibis, but other than that, that part should be working. Should we close this issue, or is there anything else that is missing from what you requested here? |
|
Yes sorry closing this. Needs to be addressed in BigQuery ibis-project/ibis-bigquery#87 |
|
Hey sorry, table.difference(table2)But if I try to create a projection like this table.difference(table2).projection(['column1', 'column2']).compile()I get a Originating from here https://github.com/ibis-project/ibis/blob/1.4.0/ibis/backends/base_sqlalchemy/compiler.py#L401 It works for Union any ideas how I can work around this e.g. with what if I want to run a filter on a difference query, @datapythonista ? |
|
Note this is for ibis 1.4.0. since main looks very different this could be fixed there alread? |
|
Not so familiar with this part, from the code looks like it should be implemented, not sure what is missing. I don't think there has been any change in that part recently, other than moving code from one place to another. Happy to take PRs for this, before or after the release. |
|
Ok I'll have a look |
|
Will probably create a PR for this tomorrow just for completeness. I am monkey-patching 1.4.0 like this in our project right now from ibis.backends.base_sqlalchemy import compiler
def _collect_Difference(self, expr, toplevel=False):
if toplevel:
raise NotImplementedError()
compiler.SelectBuilder._collect_Difference = _collect_Difference |
A lot (all?) backends support some kind of except/intersect UNION
E.g postgres https://www.postgresqltutorial.com/postgresql-union/
or bigquery https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#intersect
Does it make sense to implement these in the main repo? Do you have a feature freeze until the 2.0 release?
I could have a look at this myself if you agree this should go into ibis directly!
The text was updated successfully, but these errors were encountered: