Skip to content

Using unnest in sqlp errors instead of returning results #3108

@urkle

Description

@urkle

Describe the bug
given a CSV with a column that contains comma delimited data and using the string_to_array & unnest functions returns an array about mismatched data frame lengths instead of returning the data.

To Reproduce
Given

id,data
1,"a,b,c"

Run
`qsv sqlp data.csv "select id, unnest(string_to_array(data, ',')) as value from data"

**Expected behavior**
It returns 3 rows of data
```csv
id,value
1,a
1,b
1,c

Actual results
Failed to execute query: select id,unnest(string_to_array(data,',')) as value from test: lengths don't match: Series id, length 1 doesn't match the DataFrame height of 3

Desktop (please complete the following information):

  • OS: macOS 14.7.5
  • qsv Version 6.0.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions