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

[Go] Support null values while reading a CSV file.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0
    • Component/s: Go

      Description

       

      CSV reader doesn't support null values.

      How to reproduce

      So when given a following CSV file,  `(csv.Reader).Next` return `false`. 

      0;0;str-0
      1;;str-1
      ;2;str-2
      3;3;str-3
      4;;str-4
      5;5;str-5
      6;6;
      7;7;str-7
      8;8;str-8
      9;9;str-9

       

      The result of Example function in csv_test.go is:

      # https://github.com/apache/arrow/blob/137a69e1fb6647dde5da9d18d9da47e7a9e694b0/go/arrow/csv/csv_test.go#L32-L90
      rec[0]["i64"]: [0]
      rec[1]["f64"]: [0]
      rec[2]["str"]: ["str-0"]
      rec[0]["i64"]: [1]
      rec[1]["f64"]: [0]
      rec[2]["str"]: ["str-1"]
      

      The reason why stopping is csv.Reader got error while parsing empty string as a float64 (the error message is `strconv.ParseFloat: parsing "": invalid syntax`).

        Attachments

          Activity

            People

            • Assignee:
              briangold Brian Gold
              Reporter:
              c-bata Masashi Shibata
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 10.5h
                10.5h