You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Quang Hoang (Jira)" <ji...@apache.org> on 2022/09/15 12:49:00 UTC
[jira] [Assigned] (ARROW-17458) [C++] CSV Writer: Unsupported cast from decimal to utf8
[ https://issues.apache.org/jira/browse/ARROW-17458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Quang Hoang reassigned ARROW-17458:
-----------------------------------
Assignee: Quang Hoang
> [C++] CSV Writer: Unsupported cast from decimal to utf8
> --------------------------------------------------------
>
> Key: ARROW-17458
> URL: https://issues.apache.org/jira/browse/ARROW-17458
> Project: Apache Arrow
> Issue Type: Bug
> Components: C++
> Affects Versions: 6.0.1
> Reporter: Pavel Kovalenko
> Assignee: Quang Hoang
> Priority: Critical
> Labels: csv, decimal, good-first-issue, good-second-issue, unsupported
> Fix For: 10.0.0
>
>
> The following code snippet fails with an Unsupported cast error if a table has a decimal column.
> {code:cpp}
> 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());
> }
> {code}
> {code:cpp}
> Unsupported cast from decimal128(7, 2) to utf8 using function cast_string
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)