Skip to content

Csv Column Inference ignores newline character - #1483

Merged
cartermp merged 1 commit into
fsprojects:mainfrom
bongjunj:csv-schema-multiline
Apr 30, 2023
Merged

Csv Column Inference ignores newline character#1483
cartermp merged 1 commit into
fsprojects:mainfrom
bongjunj:csv-schema-multiline

Conversation

@bongjunj

Copy link
Copy Markdown
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.

@cartermp cartermp left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown

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

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

@bongjunj

bongjunj commented May 1, 2023

Copy link
Copy Markdown
Contributor Author

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