Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-11067

[C++] CSV reader returns nulls for some strings on macOS

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0.0
    • Component/s: C++, R

      Description

      A sample file is attached, showing 10 rows each of strings with consistent failures (false_na = TRUE) and consistent successes (false_na = FALSE). The strings are in the column `json_string` – if relevant, they are geojsons with min nchar of 33,229 and max nchar of 202,515.

      When I read this sample file with other R CSV readers (readr and data.table shown), the files are imported correctly and there are no NAs in the json_string column.

      When I read with arrow::read_csv_arrow, 50% of the sample json_string column end up as NAs. as_data_frame TRUE or FALSE does not change the behavior, so this might not be limited to the R interface, but I can't help debug much further upstream.

       

       

      aaa1 <- arrow::read_csv_arrow("demo_data.csv", as_data_frame = TRUE)
      aaa2 <- arrow::read_csv_arrow("demo_data.csv", as_data_frame = FALSE)
      bbb <- data.table::fread("demo_data.csv")
      ccc <- readr::read_csv("demo_data.csv")
      mean(is.na(aaa1$json_string)) # 0.5
      mean(is.na(aaa2$column(1))) # Scalar 0.5
      mean(is.na(bbb$json_string)) # 0
      mean(is.na(ccc$json_string)) # 0

       

       

      • arrow 2.0 (latest CRAN)
      • readr 1.4.0
      • data.table 1.13.2
      • R version 4.0.1 (2020-06-06)
      • MacOS Catalina 10.15.7 / x86_64-apple-darwin17.0

       

       

        Attachments

        1. demo_data.csv
          594 kB
          John Sheffield
        2. arrowbug1.png
          593 kB
          John Sheffield
        3. arrow_failure_cases.csv
          29 kB
          John Sheffield
        4. arrow_failure_cases.csv
          29 kB
          John Sheffield
        5. arrowbug1.png
          245 kB
          John Sheffield
        6. arrow_explanation.png
          119 kB
          John Sheffield

          Activity

            People

            • Assignee:
              westonpace Weston Pace
              Reporter:
              jms John Sheffield

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 40m
                1h 40m

                  Issue deployment