Skip to content

[R] Require Table columns to be same length #27976

@asfimport

Description

@asfimport

An error is thrown if the user attempts to create a RecordBatch with different length arrays:

> arrow::record_batch(a=1:5, b = 42)
Error: Invalid: All arrays must have the same length 

But no error is thrown if the user attempts to create a Table with different length columns. Instead we get garbage in the table:

Table$create(a=1:5, b = 42) %>% collect()
# A tibble: 5 x 2
      a         b
  <int>     <dbl>
1     1 4.20e+  1
2     2 6.94e-310
3     3 6.94e-310
4     4 6.94e-310
5     5 6.94e-310  

Change the behavior for Table creation to match the current behavior of RecordBatch creation.

Reporter: Ian Cook / @ianmcook
Assignee: Ian Cook / @ianmcook

Related issues:

PRs and other links:

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions