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

Improve candidate error message and relax constraint of rfc_4180 = false on quotes #15371

Draft
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

pdet
Copy link
Contributor

@pdet pdet commented Dec 16, 2024

This PR allows us to read the hits.csv file without setting any options.

@duckdb-draftbot duckdb-draftbot marked this pull request as draft December 17, 2024 16:32
@pdet pdet marked this pull request as ready for review December 19, 2024 11:51
@pdet
Copy link
Contributor Author

pdet commented Dec 19, 2024

I've added a few more tests regarding unescaped quotes with escapes.

It is not possible to have full relaxation of unescaped quotes. This is due to it being impossible with the state machine alone to resolve the end of a value.

To give an example, let's inspect the following line. The CSV file has two columns, name,age, and the configuration would be delim = ',', quote = '"', escape = '"'.

For example:

""Oogie Boogie", "sir", 4

In one pass, it is impossible to assert whether this line has 2 or 3 columns, since we have a quote " followed by a delimiter , in different places. Even though the intention seems to be obvious.

I think this can only be supported with the auto-correction idea, where we can force the line to match our schema, but that is outside the scope of this PR.

@duckdb-draftbot duckdb-draftbot marked this pull request as draft December 19, 2024 12:25
@pdet pdet marked this pull request as ready for review December 20, 2024 12:39
@duckdb-draftbot duckdb-draftbot marked this pull request as draft December 24, 2024 10:57
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.

1 participant