Skip to content

Conversation

@hubgeter
Copy link
Contributor

bp #37687

Proposed changes

Supports reading CSV data using LF and CRLF as line separators.

csv file:

1,abc
2,def\r
3,qwe
4,hello\r

if you set keep_carriage_return = false
you will get :

1   abc
2   def
3   qwe
4   hello

Here, both \r\n and \n are used as delimiters.

if you set keep_carriage_return = true
you will get :

1   abc
2   def\r
3   qwe
4   hello\r

Here only \n is used as a delimiter.

It should be noted that set keep_carriage_return = true is valid for tvf, but not for stream load/mysql load. This means that when you perform stream load/mysql load, crlf and lf will be automatically used as delimiters, even if you set keep_carriage_return = true.

…arators. (apache#37687)

Supports reading CSV data using LF and CRLF as line separators.

csv file:
```
1,abc
2,def\r
3,qwe
4,hello\r
```
if you  `set keep_carriage_return = false`
you will get :
```mysql
1   abc
2   def
3   qwe
4   hello
```
Here, both \r\n and \n are used as delimiters.

if you  `set keep_carriage_return = true`
you will get :
```mysql
1   abc
2   def\r
3   qwe
4   hello\r
```
Here only \n is used as a delimiter.

It should be noted that `set keep_carriage_return = true` is valid for
tvf, but not for stream load/mysql load. This means that when you
perform stream load/mysql load, crlf and lf will be automatically used
as delimiters, even if you `set keep_carriage_return = true`.
@doris-robot
Copy link

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR

Since 2024-03-18, the Document has been moved to doris-website.
See Doris Document.

@hubgeter
Copy link
Contributor Author

run buildall

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@morningman morningman merged commit 50015d7 into apache:branch-3.0 Aug 28, 2024
@gavinchou gavinchou mentioned this pull request Oct 13, 2024
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