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

Csv Column Inference ignores newline character #1483

Merged
merged 1 commit into from
Apr 30, 2023

Conversation

bongjunj
Copy link
Contributor

Changed the string reader in the parseHeaders function to erase newline characters before it runs inferences using the input schema.

This will resolve the issue: #952 .

A test to check this change is added. The test passes.

Copy link
Collaborator

@cartermp cartermp left a comment

Choose a reason for hiding this comment

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

Interesting approach! I like it, will merge if tests pass.

@cartermp cartermp merged commit e48a7ab into fsprojects:main Apr 30, 2023
@bongjunj bongjunj deleted the csv-schema-multiline branch May 1, 2023 00:31
@nightroman
Copy link

I wonder, what about "\r\n"?

            use reader = new StringReader(schema.Replace("\n", ""))

@bongjunj
Copy link
Contributor Author

bongjunj commented May 1, 2023

Oh, that's a valid point. I will make a patch.

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

Successfully merging this pull request may close these issues.

3 participants