You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Aliasing columns in a query results in the query's result missing data #118
SELECT carat as a, color as b FROMdefault.diamondsLIMIT2;
-- 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 FROMdefault.diamondsLIMIT2;
-- Result
┌─────────┬─────┐
│ (index) │ a │
├─────────┼─────┤
│ 0 │ 'E' │
│ 1 │ 'E' │
└─────────┴─────┘
Is it possible to handle this scenario properly so we get the right data for such queries?
Hi @varun-dc! Yes, we know that such behavior exists, as well as in other connectors (which also don't have any special handling for duplicated columns, so their behavior slightly differs). We're trying to find a good solution for this issue which will work across all connectors, but meanwhile can only suggest you to avoid diplucated column names in your queries. Sorry for the inconvenience
P.S. I'll definitely keep this issue open so we can continue discussion here and post updates. Also, if you have any ideas - feel free to share. Thank you!
I've seen this problem before in drivers for other databases and the common solution is the implementation of a rowMode option, for example like in node's pg - https://node-postgres.com/features/queries#row-mode.
Activity
kravets-levko commentedon Feb 28, 2023
Hi @varun-dc! Yes, we know that such behavior exists, as well as in other connectors (which also don't have any special handling for duplicated columns, so their behavior slightly differs). We're trying to find a good solution for this issue which will work across all connectors, but meanwhile can only suggest you to avoid diplucated column names in your queries. Sorry for the inconvenience
P.S. I'll definitely keep this issue open so we can continue discussion here and post updates. Also, if you have any ideas - feel free to share. Thank you!
tom-james-watson commentedon Feb 28, 2023
I've seen this problem before in drivers for other databases and the common solution is the implementation of a
rowModeoption, for example like in node'spg- https://node-postgres.com/features/queries#row-mode.kravets-levko commentedon Aug 15, 2023
Internal ticket: PECO-970 Probably will start working on this very soon
peco-engineer-bot commentedon Nov 11, 2026
🤖 engineer-bot could not complete an automated fix. See the workflow run for details.
feat: add rowMode option to return rows as arrays