-
Notifications
You must be signed in to change notification settings - Fork 600
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
refactor(api): ddl accessor #9832
base: main
Are you sure you want to change the base?
Conversation
ACTION NEEDED Ibis follows the Conventional Commits specification for release automation. The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification. |
71b1c26
to
e0503f8
Compare
@gforsyth I did a first path at
Right now we have a lot of tests that rely on asserts that use |
c7a022f
to
e0409a3
Compare
I'm trying to get the DuckDB backend green so I can move on to the other backend's implementation but I'm having a few issues that I idk where they are coming from. I think if we can fix those we are on a safe point to move onto the other backends. |
ba2ce96
to
7b45992
Compare
…se` in `_fetch_from_cursor` (ibis-project#9913) Previously we were trying to close a cursor after an exception was raised in `raw_sql`, which already closes the cursor in the case of an exception. This is not allowed by the oracledb driver, so just close the cursor on success.
287e9a3
to
356ef91
Compare
Discussion for postgres: So, we are currently on main doing something weird with I created a table, a temp table, a view a temp view and a foreign table in psql.
on Ibis
On the PR I propose,
|
yeah, I think that sounds good! |
356ef91
to
b382a1b
Compare
81010a6
to
5c22bc2
Compare
Very rough start, so far I created the DDL accessor and I'm trying to get to run the some methods as they are (no changes yet to functionality) from the accessor like
con.ddl.list_
, this works. But I'm having problems triggering the deprecation when doingcon.list_
.I thought if I deprecate the abstract methods that would do it, but it doesn't because it looks immediately for the backend specific implementation. Not sure what's the best solution here design wise.
** How do we deprecate in this case? **
If I move the deprecation to the Backend implementation of let's say
list_tables
as an example, it will trigger both when doingcon.list_tables()
andcon.ddl.list_tables()
One option would be taking the methods out of the
backend
class, to a let's sayDDL
and access them via the accessor, and when the ones on the Backend class get accessedcon.list_
they'll warn and point to thecon.ddl.list_
. If we do this, I wonder if having aDDLBase
with all abstract methods might make sense here, something similar to what we do with the BaseBackend one.EDIT:
After discussing with Gil here are the steps to proceed:
list_*
in Backend specific_list_*
in Backend specificlist_*
in the ddl accessor, point it to theself._backend._list_*
methodTODO:
list_*
related work, working for duckdbcc: @gforsyth for when you are back