Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Aliasing columns in a query results in the query's result missing data

Open
#118 3 comments 2 reactions 0 assignees View on GitHub

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

bug Component: Results Processing
  • 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databricks/databricks-sql-nodejs

All issues in databricks/databricks-sql-nodejs

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.