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
CLN: Removing Query class #2789
CLN: Removing Query class #2789
Conversation
@jreback this is finally passing the tests, if you don't mind having a look. |
yeah looks good. assume this has no effect on perf anywhere? prob worth adding a release note (even though in theory users shouldn't be affected) |
Added the release note. I don't see how this could affect performance (the code is exactly the same, just not using |
LGTM but I am little concerned about the implications of this change on other "Query" related class such as Do those classes continue to work with the removal of the |
I am not familiar with the sql backends so maybe they are not related as all (only share the same word |
Not sure what's the concern regarding those classes, but to me this PR is a quite important milestone. This code was generating problems when trying to clean up things, and also was very confusing (for no reason), as explained in the description. Also, based on your comment, I think it helps also to not confuse things with the other unrelated concepts, since Just to note, this is not a final stage of things. This is important since |
@icexelloss let me know if my previous comment makes sense, or if you've got any other concern. Would be nice to merge this soon, as it's blocking me from the working in the other PRs I've got open. Thanks! |
Sounds good to me! +1 |
thanks @datapythonista very nice |
@datapythonista removing the https://github.com/ibis-project/ibis-bigquery/blob/main/ibis_bigquery/client.py#L174 I haven't taken a detailed look at this refactor PR yet but do you see a way to refactor this usage as well? |
Unfortunately there is no way to make these improvements without breaking the backends. It's not only bigquery, all them are affected. For the ones in this repo the PR updates them to the new way of implementing things. For the rest (bigquery, omnisci, mssql...) it'll need to be done before the next release. The changes required are the same as in this PR, if you check clickhouse for example, you'll see what needs to be done. It's quite small. |
The
Query
class and subclasses have a tricky implementation, and are causing problems in #2777.The class
SQLClient
instantiates theQuery
class, passing itself as a parameter, and then calls it'sexecute
method, which will call the client_execute
method. This seems nonsense, and just implementing the functionality ofQuery
(which is quite simple) inSQLClient
seems to be much more reasonable.