You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Maciej (Jira)" <ji...@apache.org> on 2020/09/28 12:21:00 UTC

[jira] [Updated] (ARROW-10115) [C++] CSV empty quoted string is treated as NULL

     [ https://issues.apache.org/jira/browse/ARROW-10115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maciej updated ARROW-10115:
---------------------------
    Description: 
When parsing my CSV I have set
{color:#267f99}ConvertOptions{color}::s{color:#001080}trings_can_be_null to true.{color}

{color:#001080}Now as I have values:{color}
{code:java}
1234,"",345
{code}
{color:#001080}the string value which is an empty string is treated as NULL.
I've checked default valeus of {color:#267f99}ConvertOptions{color}::n{color}{color:#001080}ull_values and there is empty string considered null, but here we have empty quoted string which shouldn't be treated as NULL in my opinion. Similar behavior we have in Postgresql empty quoted string is not treated as a NULL: https://www.postgresql.org/docs/12/sql-copy.html{color}

  was:
When parsing my CSV I have set
{color:#267f99}ConvertOptions{color}::s{color:#001080}trings_can_be_null to true.{color}

{color:#001080}Now as I have values:{color}
{code:java}
1234,"",345
{code}
{color:#001080}the string value which is an empty string is treated as NULL.
I've checkeced default valeus of {color:#267f99}ConvertOptions{color}::n{color}{color:#001080}ull_values and there is empty string considered null but it's not empty string it's quoted empty string which shouldn't be treated as NULL in my opionion. Simillar behavior we have in Postgresql empty quoted string is not treated as a NULL: https://www.postgresql.org/docs/12/sql-copy.html{color}


> [C++] CSV empty quoted string is treated as NULL
> ------------------------------------------------
>
>                 Key: ARROW-10115
>                 URL: https://issues.apache.org/jira/browse/ARROW-10115
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>    Affects Versions: 1.0.1
>            Reporter: Maciej
>            Priority: Major
>
> When parsing my CSV I have set
> {color:#267f99}ConvertOptions{color}::s{color:#001080}trings_can_be_null to true.{color}
> {color:#001080}Now as I have values:{color}
> {code:java}
> 1234,"",345
> {code}
> {color:#001080}the string value which is an empty string is treated as NULL.
> I've checked default valeus of {color:#267f99}ConvertOptions{color}::n{color}{color:#001080}ull_values and there is empty string considered null, but here we have empty quoted string which shouldn't be treated as NULL in my opinion. Similar behavior we have in Postgresql empty quoted string is not treated as a NULL: https://www.postgresql.org/docs/12/sql-copy.html{color}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)