Aliasing columns in a query results in the query's result missing data
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- sql, typescript
- Domain
- databases
Research direction
Start by running the minimal reproduction linked in the issue with the two SQL queries and compare their result shapes. Trace the TypeScript connector's query-result handling from that reproduction; done means repeated column aliases preserve all returned values rather than dropping the earlier column.
Written by the indexing model from the issue text.
Description
- Check existing issues for a duplicate of this bug
Summary
This query returns the expected data,
SELECT carat as a, color as b FROM default.diamonds LIMIT 2;
-- Result
┌─────────┬────────┬─────┐
│ (index) │ a │ b │
├─────────┼────────┼─────┤
│ 0 │ '0.23' │ 'E' │
│ 1 │ '0.21' │ 'E' │
└─────────┴────────┴─────┘
Whereas this query returns results missing data,
SELECT carat as a, color as a FROM default.diamonds LIMIT 2;
-- Result
┌─────────┬─────┐
│ (index) │ a │
├─────────┼─────┤
│ 0 │ 'E' │
│ 1 │ 'E' │
└─────────┴─────┘
Is it possible to handle this scenario properly so we get the right data for such queries?
Reproduction
You'll find a minimal and complete reproduction example here that you can run yourself https://github.com/varun-dc/databricks-nodejs-duplicate-column-select-bug-reproduction
- Dominant language
- TypeScript
- Stars
- 36
- Forks
- 50
- Avg merge
- 13h 46m
- Merged PRs (30d)
- 9
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.
More from databricks/databricks-sql-nodejs
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
engineer-bot
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
databricks/databricks-sql-nodejs#274 · 1 comment · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in databricks/databricks-sql-nodejs
Similar issues
-
clawsweeper:linked-pr-open clawsweeper:no-new-fix-pr clawsweeper:source-repro impact:message-loss issue-rating: 🦞 diamond lobster maturity:stable P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Eynzof/Hermes-CN-Desktop#616 ·
-
ZCode 3.14.3 に対応する Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
supermomonga/zcode-acp#24 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
growthbook/growthbook#7100 ·
-
triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100