Skip to content

[R] Add option to attempt 32-bit integer type inference in CSV reader #30083

@asfimport

Description

@asfimport

Expose ARROW-13028 to the R bindings so that users can choose to have read_csv_arrow(as_data_frame = FALSE) and open_dataset(format = "csv) infer 32-bit integer fields instead of always inferring 64-bit integer fields for all integers (the current behavior).

Note that there is an existing option in the R bindings that controls something similar: arrow.int64_downcast. See ARROW-10093 for details. I think we can not reuse this option to control the CSV reader, behavior because (a) users might want to control these behaviors separately, and (b) the default value of arrow.int64_downcast is TRUE which does not align with the existing behavior of the CSV reader (always inferring 64-bit integer fields, i.e. not downcasting) and we probably want to retain that as the default behavior. So we will want to add a new argument or a new option to control this.

Reporter: Ian Cook / @ianmcook

Related issues:

Note: This issue was originally created as ARROW-14528. Please see the migration documentation for further details.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions