You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Daniel Salomons (Jira)" <ji...@apache.org> on 2022/10/10 08:25:00 UTC

[jira] [Created] (ARROW-17970) [Ruby] Parsing escaped inner quotations incorrectly.

Daniel Salomons created ARROW-17970:
---------------------------------------

             Summary: [Ruby] Parsing escaped inner quotations incorrectly.
                 Key: ARROW-17970
                 URL: https://issues.apache.org/jira/browse/ARROW-17970
             Project: Apache Arrow
          Issue Type: Bug
          Components: Ruby
    Affects Versions: 9.0.0
         Environment: M1 macbook running ruby 3.0.3
            Reporter: Daniel Salomons


When using the CSVReader for a value with inner quotations escaped by backslashes the value is incorrectly parsed.

When I use
{code:java}
table = Arrow::MemoryMappedInputStream.open(file.path) do |input|
    Arrow::CSVReader.new(input, options).read
end{code}
On a row such as
{code:java}
"Some value", "Another \"value\" quotations", "Last value"{code}
It outputs 
{code:java}
Some value
Another value" quotations"
Last value{code}
When my expected output is
{code:java}
Some value
Another "value" quotations
Last value{code}
I've tried plenty of different options in different combinations
options.quoted = true
options.double_quoted = false (tried with true)
options.escape_character = 92

I assume this is a bug.



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