Skip to content

fix: fix incorrect splitting with line delimited streaming#700

Merged
tustvold merged 3 commits into
apache:mainfrom
bboissin:push-kqpokpnqwusw
Jun 2, 2026
Merged

fix: fix incorrect splitting with line delimited streaming#700
tustvold merged 3 commits into
apache:mainfrom
bboissin:push-kqpokpnqwusw

Conversation

@bboissin
Copy link
Copy Markdown
Contributor

In some cases, valid CSV in datafusion would return: Generic { store: "LineDelimiter", source: UnterminatedString } due to incorrect logic.

records_ends is a double ended iterator, so when calling next_back() the quoting/escaping logic would run in reverse, corrupting the internal state.

Which issue does this PR close?

Closes #650

@bboissin bboissin force-pushed the push-kqpokpnqwusw branch from eb82fdc to f37ccf8 Compare April 25, 2026 11:42
Comment thread src/delimited.rs Outdated
In some cases, valid CSV in datafusion would return:
`Generic { store: "LineDelimiter", source: UnterminatedString }` due to incorrect logic.

records_ends is a double ended iterator, so when calling next_back() the
quoting/escaping logic would run in reverse, corrupting the internal state.
@bboissin bboissin force-pushed the push-kqpokpnqwusw branch from f37ccf8 to 36af88f Compare April 27, 2026 16:50
Copy link
Copy Markdown
Contributor

@tustvold tustvold left a comment

Choose a reason for hiding this comment

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

Thank you for this, added a small tweak to use .last instead of collecting into a vec

@tustvold tustvold merged commit 8c7fb0a into apache:main Jun 2, 2026
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.

newline_delimited_stream incorrect processing Generic { store: "LineDelimiter", source: UnterminatedString } on valid CSVs (impacts datafusion)

3 participants