[ 
https://issues.apache.org/jira/browse/IGNITE-12852?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17584216#comment-17584216
 ] 

Anton Kurbanov commented on IGNITE-12852:
-----------------------------------------

[~tledkov] So, the two major points we are currently missing from the RFC are: 
ability to parse optional CSV file header and fields with linebreaks.

I absolutely agree that we must support both of them, please let me know your 
opinion whether:

1. should it be implemented as part of this ticket or as a separate issue?

2. we may think of some cumbersome corner case, like:
 — in current implementation we have relaxed requirements on number of fields 
in the record, RFC4180 explicitly requires that a number of fields in each row 
should be the same
— this may lead to delayed detection of whether the row is on multiple lines or 
the record is broken as we may potentially lookup for enclosing bracket until 
the unknown place in the file which may be even not found, a simple example 
would be a single column CSV file (something like dictionary) with broken 
record in the very beginning with the linebreak.

so the question is that do we want to commit to RFC or leave this option as a 
flag and attempt to introduce some fail-fast option?



> Comma in field is not supported by COPY command
> -----------------------------------------------
>
>                 Key: IGNITE-12852
>                 URL: https://issues.apache.org/jira/browse/IGNITE-12852
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.8
>            Reporter: YuJue Li
>            Assignee: Anton Kurbanov
>            Priority: Critical
>             Fix For: 2.14
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> CREATE TABLE test(a int,b varchar(100),c int,PRIMARY key(a)); 
>  
> a.csv: 
> 1,"a,b",2 
>  
> COPY FROM '/data/a.csv' INTO test (a,b,c) FORMAT CSV; 
>  
> The copy command fails because there is a comma in the second field,but this 
> is a fully legal and compliant CSV format



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to