Skip to content

fix: Don't cast all types to string for CSV - #498

Closed
candiduslynx wants to merge 5 commits into
mainfrom
fix/csv/supported-types
Closed

candiduslynx wants to merge 5 commits into
mainfrom
fix/csv/supported-types

Conversation

@candiduslynx

@candiduslynx candiduslynx commented May 9, 2024 •

Copy link
Copy Markdown
Contributor

Fixes https://github.com/cloudquery/cloudquery-issues/issues/1644

Requires apache/arrow#41595 & bump to arrow v16.1.0.

Diff in files generated:

  1. date32 & date64: 2021-01-02 00:00:00 is now 2021-01-02 00:00:00Z (so this can also be considered a follow-up for fix(deps): Upgrade github.com/apache/arrow/go to v16 #494)
  2. Lists are marshaled as lists instead of strings, so it required a deep conversion for proper support (ValueStr ignores null value set to "")

@candiduslynx
candiduslynx requested review from a team, disq and maaarcelino and removed request for a team and maaarcelino May 9, 2024 05:30
@github-actions github-actions Bot added fix and removed fix labels May 9, 2024
@github-actions github-actions Bot added fix and removed fix labels May 9, 2024
@candiduslynx
candiduslynx force-pushed the fix/csv/supported-types branch from 51c9c6f to 3f47c1f Compare May 9, 2024 06:45
Comment thread csv/write.go
return dt
}
switch dt := dt.(type) {
case *arrow.MapType:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maps aren't supported

Comment thread csv/write.go
}
switch dt := dt.(type) {
case *arrow.MapType:
case *arrow.FixedSizeListType:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lists are converted as list(converted elem)

@github-actions github-actions Bot added fix and removed fix labels May 9, 2024
@erezrokah

erezrokah commented May 9, 2024 •

Copy link
Copy Markdown
Member

Can we wait for someone to complain about the CSV format before fixing this? We recently did a breaking change in all our destinations that are using this module due to #494 (which was justified as it fixed some stuff in Parquet, JSON and CSV for timestamps). Not sure we should do another one only because of a CSV issue nobody reported on.

@candiduslynx
candiduslynx marked this pull request as draft May 9, 2024 07:56
@candiduslynx
candiduslynx marked this pull request as ready for review June 28, 2024 20:13
@candiduslynx

Copy link
Copy Markdown
Contributor Author

@erezrokah please consider merging this

@candiduslynx

Copy link
Copy Markdown
Contributor Author

@erezrokah @hermanschaaf @yevgenypats
Closing this PR to free the GitHub board.
If you would like to merge this instead tag me so that I can reopen.
cc: @disq as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants