INCATools / INCATools/ontology-access-kit
Chore: Getting SADeprecationWarning in SQL code
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 198
- Forks
- 35
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 1
Description
The above line raises an error when called.
SADeprecationWarning: DISTINCT ON is currently supported only by the PostgreSQL dialect. Use of DISTINCT ON for other backends is currently silently ignored, however this usage is deprecated, and will raise CompileError in a future release for all backends that do not support this syntax.
This is a SQLAlchemy issue, it looks like we need to change part of how the query string is generated using an engine, https://github.com/sqlalchemy/sqlalchemy/discussions/7899#discussioncomment-2501872
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in src/oaklib/implementations/sqldb/sql_implementation.py at line 2659 and reproduce the call that emits the SADeprecationWarning. Read the linked SQLAlchemy discussion while tracing how the query string is generated with an engine. Done means the query no longer raises this warning for the affected backend.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, sqlalchemy
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100