Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sqlutil.FrameFromRows: multiple results sets with different columns fail #827

Open
gabor opened this issue Dec 4, 2023 · 1 comment
Open
Labels
enhancement New feature or request stale Issue or PR without activity

Comments

@gabor
Copy link
Contributor

gabor commented Dec 4, 2023

try to run this query in postgres (may work in other databases too):

select 41; select 42 as A, 43 as B;

and call sqlutil.FrameFromRows on the result.

it fails with the error message: sql: expected 1 destination arguments in Scan, not 2

the PR #735 added support for handling multiple result sets, but it only works fine if every result-set has the same columns.

i'm not sure what the best solution would be:

  • return multiple frames in this case (needs change to the API, currently it returns a single frame)
  • behave as currently, but detect this problem and return a better error message
  • something else
@gabor gabor added the bug Something isn't working label Dec 4, 2023
@academo academo added enhancement New feature or request and removed bug Something isn't working labels Feb 28, 2024
@github-actions github-actions bot added the stale Issue or PR without activity label May 29, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 13, 2024
@gabor
Copy link
Contributor Author

gabor commented Jun 17, 2024

the problem still exists, FrameFromRows does not handle data correctly in certain situations.

@gabor gabor added bug Something isn't working and removed enhancement New feature or request labels Jun 17, 2024
@gabor gabor reopened this Jun 17, 2024
@gabor gabor added bug Something isn't working and removed bug Something isn't working stale Issue or PR without activity labels Jun 17, 2024
@gabor gabor added enhancement New feature or request and removed bug Something isn't working labels Jun 25, 2024
@github-actions github-actions bot added the stale Issue or PR without activity label Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale Issue or PR without activity
Projects
Status: Backlog
Development

No branches or pull requests

2 participants