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

Using array_agg results in a string #268

Closed
robertsmit opened this issue Mar 9, 2023 · 2 comments
Closed

Using array_agg results in a string #268

robertsmit opened this issue Mar 9, 2023 · 2 comments

Comments

@robertsmit
Copy link

robertsmit commented Mar 9, 2023

When querying something like
SELECT Array[1,3] as col1

just results in a row with a vector.

But when using something like:
Select array_agg(t.textval) as col1 from table t group by true
Give me a string.

Is this a known issue. I expect to get a Vector as col1 result.

@robertsmit
Copy link
Author

robertsmit commented Mar 9, 2023

relates to

saw something about that it only works for integers.

@iamed2
Copy link
Collaborator

iamed2 commented Mar 9, 2023

Yes I think that linked issue (#58) covers the feature request, since array_agg does work on integers:

julia> execute(conn, "SELECT array_agg(t.ns) FROM (VALUES (1),(2)) AS t (ns);")[1,1]
2-element Vector{Union{Missing, Int32}}:
 1
 2

@iamed2 iamed2 closed this as completed Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants