`describe_table` fails on SQL Server
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 80/100
Research direction
Start from the describe_table code that builds the fallback sampling query with sprintf and n_fallback_rows, since LIMIT is the failing part. Reproduce the error against a SQL Server connection, or check the generated SQL in the error text. Done when the fallback uses a portable zero-row query (WHERE 1 = 0) that still returns typed columns, and the existing tests pass.
Written by the indexing model from the issue text.
Description
For a generic DBI connection, describe_table works out column types by sampling rows:
sprintf("SELECT * FROM %s LIMIT %d", DBI::dbQuoteIdentifier(con, id), n_fallback_rows)
T-SQL has no LIMIT, so this fails for every table on SQL Server:
✖ Incorrect syntax near '5'.
• <SQL> 'SELECT * FROM "shop"."dbo"."sales" LIMIT 5'
A zero-row query (SELECT * FROM x WHERE 1 = 0) is portable and still returns typed columns. Other backends without LIMIT, like Oracle, likely fail the same way.
- Dominant language
- Python
- Stars
- 69
- Forks
- 5
- Avg merge
- 5d 13h
- Merged PRs (30d)
- 30
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
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.
More from posit-dev/commons
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 2 days
-
enhancement py
Difficulty 3/5 1-2 days Newbie friendliness 67/100
Maintainers usually reply within 2 days
-
py
Difficulty 4/5 1-2 days Newbie friendliness 35/100
posit-dev/commons#471 · 1 comment ·
Maintainers usually reply within 2 days
-
include `instructions` in the commons' print method outputPossibly taken @simonpcouch claimed this 3 days ago. Open
Difficulty 3/5 Half a day Newbie friendliness 25/100
Maintainers usually reply within 2 days
All issues in posit-dev/commons
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
FinanceFlash/unvibecode#577 · 1 comment ·
Maintainers usually reply within 1 day
-
area/test type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Clodmony/starship-coop#70 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
punitarani/fli#270 ·
-
🐛 Bug 🔔 Pending processing
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
jumpserver/jumpserver#17980 ·
Maintainers usually reply within 1 day
-
community enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 1 day