Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
6.0.1
Description
The following code snippet fails with an Unsupported cast error if a table has a decimal column.
std::shared_ptr<arrow::Table> table; ARROW_CHECK_OK(reader->ReadAll(&table)); std::shared_ptr<arrow::io::OutputStream> output = arrow::io::FileOutputStream::Open(csvPath).ValueOrDie(); auto writeOptions = arrow::csv::WriteOptions::Defaults(); writeOptions.include_header = false; auto status = arrow::csv::WriteCSV(*table, writeOptions, output.get()); if (!status.ok()) { SETHROW_ERROR(std::runtime_error, "Couldn't write table csv: {}", status.message()); }
Unsupported cast from decimal128(7, 2) to utf8 using function cast_string
Attachments
Issue Links
- is related to
-
ARROW-17774 [Python] write csv decimal cast error
- Resolved
- relates to
-
ARROW-17042 [C++] Add cast from decimal to string and back
- Open
- links to