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

[C++] Cast duration to string (thus CSV writing) not supported

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 7.0.0, 7.0.2
    • 11.0.0
    • C++, R

    Description

      Edit (Dragos Moldovan-Grünfeld): The issue I opened (ARROW-15833) is basically a duplicate of this. It's fundamentally a C++ issue that happened to surface in the R CSV writer. I hope you don't mind, I modified the components to C++

      ===================
      Consider this reprex:

      arrow::write_csv_arrow(data.frame(time = as.difftime(1, units="secs")), "test.csv")

      This errors with:

      Error: NotImplemented: Unsupported cast from duration[s] to utf8 using function cast_string

       

      Note that readr::write_csv() has no trouble with this (which renders the data as "1" without a unit).  Arguably the readr rendering is lossy, but then we usually assume units are provided in other metadata anyway.

      Attachments

        Issue Links

          Activity

            People

              benpharkins Ben Harkins
              cboettig Carl Boettiger
              Votes:
              0 Vote for this issue
              Watchers:
              7 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 - 1h 20m
                  1h 20m