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

[Go] CSV Reader should use AppendValueFromString for extension types #35188

Closed
hermanschaaf opened this issue Apr 17, 2023 · 0 comments · Fixed by #35189
Closed

[Go] CSV Reader should use AppendValueFromString for extension types #35188

hermanschaaf opened this issue Apr 17, 2023 · 0 comments · Fixed by #35189
Assignees
Milestone

Comments

@hermanschaaf
Copy link
Contributor

Describe the bug, including details regarding any error messages, version, and platform.

Currently the Go CSV reader uses dec := json.NewDecoder(strings.NewReader("+ str +")), adding quotes around the string. This works for the tested cases, like UUID, because UUID strings do not contain any additional quotes. However, this approach fails to account for extension types that have quotes that in the string themselves. Instead the recently added AppendValueFromString should be used, as this provides the opposite operation for the write which uses ValueStr.

Component(s)

Go

zeroshade pushed a commit that referenced this issue Apr 18, 2023
…eader (#35189)

Rather than adding quotes and using `json.NewDecoder` to decode extension types, we should use `AppendValueFromString` which provides the opposite operation to `ValueStr`.

Closes #35188
* Closes: #35188

Authored-by: Herman Schaaf <hermanschaaf@gmail.com>
Signed-off-by: Matt Topol <zotthewizard@gmail.com>
@zeroshade zeroshade added this to the 13.0.0 milestone Apr 18, 2023
liujiacheng777 pushed a commit to LoongArch-Python/arrow that referenced this issue May 11, 2023
… CSV Reader (apache#35189)

Rather than adding quotes and using `json.NewDecoder` to decode extension types, we should use `AppendValueFromString` which provides the opposite operation to `ValueStr`.

Closes apache#35188
* Closes: apache#35188

Authored-by: Herman Schaaf <hermanschaaf@gmail.com>
Signed-off-by: Matt Topol <zotthewizard@gmail.com>
ArgusLi pushed a commit to Bit-Quill/arrow that referenced this issue May 15, 2023
… CSV Reader (apache#35189)

Rather than adding quotes and using `json.NewDecoder` to decode extension types, we should use `AppendValueFromString` which provides the opposite operation to `ValueStr`.

Closes apache#35188
* Closes: apache#35188

Authored-by: Herman Schaaf <hermanschaaf@gmail.com>
Signed-off-by: Matt Topol <zotthewizard@gmail.com>
rtpsw pushed a commit to rtpsw/arrow that referenced this issue May 16, 2023
… CSV Reader (apache#35189)

Rather than adding quotes and using `json.NewDecoder` to decode extension types, we should use `AppendValueFromString` which provides the opposite operation to `ValueStr`.

Closes apache#35188
* Closes: apache#35188

Authored-by: Herman Schaaf <hermanschaaf@gmail.com>
Signed-off-by: Matt Topol <zotthewizard@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants