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 Reader] Also use figure-out-line code when ignoring errors. #14184

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions data/csv/auto/14177.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"id","description"
"1","This is a test description for id 1"
"2","This is a test description,
This is a
longer description for id 2"
"3","This is a test description,
This is a
longer description for id 3"
"4","This is a test description,
This is a
longer description for id 4"
"5","This is a test description,
This is a
longer description for id 5"
Original file line number Diff line number Diff line change
Expand Up @@ -1470,10 +1470,6 @@ void StringValueScanner::SetStart() {
}
return;
}
if (state_machine->options.IgnoreErrors()) {
// If we are ignoring errors we don't really need to figure out a line.
return;
}
// The result size of the data after skipping the row is one line
// We have to look for a new line that fits our schema
// 1. We walk until the next new line
Expand Down
11 changes: 11 additions & 0 deletions test/sql/copy/csv/auto/test_14177.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# name: test/sql/copy/csv/auto/test_14177.test
# description: Test CSV Sample works for #14177
# group: [auto]

statement ok
PRAGMA enable_verification

query I
select count(*) FROM (FROM read_csv('data/csv/auto/14177.csv', buffer_size=80, ignore_errors = true)) as t
----
5
Loading