kuzu icon indicating copy to clipboard operation
kuzu copied to clipboard

Bug: CLI `:mode csv` not giving valid lists

Open mxwli opened this issue 6 months ago • 0 comments

Kùzu version

master

What operating system are you using?

No response

What happened?

> :mode csv
> unwind [[1,2,3],[4,5,6]] as col1 unwind [['a', 'b', 'c'], ['x', 'y', 'z']] as col2 return col1, col2;

gives

[1,2,3],[a,b,c]
[4,5,6],[a,b,c]
[1,2,3],[x,y,z]
[4,5,6],[x,y,z]

Which is not correct. Most readers -including us- interpret the above as having 6 columns. It should put the lists in quotes so as to group the entire list as one element

"[1,2,3]","[a,b,c]"
"[4,5,6]","[a,b,c]"
"[1,2,3]","[x,y,z]"
"[4,5,6]","[x,y,z]"

This bug occurs in any type involving commas, including maps, arrays, and structs.

mxwli avatar Aug 13 '24 18:08 mxwli