You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Mike Seddon (Jira)" <ji...@apache.org> on 2020/12/23 19:50:00 UTC
[jira] [Commented] (ARROW-11013) [Rust] CSV Reader cannot handle
leading/trailing WhiteSpace
[ https://issues.apache.org/jira/browse/ARROW-11013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17254219#comment-17254219 ]
Mike Seddon commented on ARROW-11013:
-------------------------------------
The underlying csv crate supports a four different behaviors for trimming strings:
None (default): does no trimming.
Headers: trim only header fields.
Fields: trim only field values.
All: trim both headers and field values.
Rather than exposing all these options and forcing users to understand the underlying csv crate this PR simplifies this decision to boolean: None (false) or All (true) while retaining the default false behavior.
> [Rust] CSV Reader cannot handle leading/trailing WhiteSpace
> -----------------------------------------------------------
>
> Key: ARROW-11013
> URL: https://issues.apache.org/jira/browse/ARROW-11013
> Project: Apache Arrow
> Issue Type: Bug
> Components: Rust, Rust - DataFusion
> Affects Versions: 2.0.0
> Reporter: Mike Seddon
> Priority: Major
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> Currently the CSV Reader assumes very clean input data which does not have things like leading spaces. This means parsing data like the TPC-H 'answers' set from the databricks/tpch_dbgen repo does not work (like below).
> Spark uses the Univocity parser library provides the options 'ignoreLeadingWhitespace' and 'ignoreTrailingWhitespace' which would help fix this issue.
> ```
> l|l|sum_qty|sum_base_price|sum_disc_pricesum_chargeavg_qtyavg_priceavg_disccount_order
> A|F|37734107.00|56586554400.73|53758257134.87|55909065222.83|25.52|38273.13|0.05| 1478493
> ```
--
This message was sent by Atlassian Jira
(v8.3.4#803005)