Skip to content

[R] Support scalar value recycling in RecordBatch/Table$create() #27565

Closed

Description

@asfimport

Compare:

> tibble::tibble(a=1:5, b = 42)
# A tibble: 5 x 2
      a     b
  <int> <dbl>
1     1    42
2     2    42
3     3    42
4     4    42
5     5    42
> arrow::record_batch(a=1:5, b = 42)
Error: Invalid: All arrays must have the same length

Reporter: Neal Richardson / @nealrichardson
Assignee: Nicola Crane / @thisisnic

Related issues:

PRs and other links:

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

Activity

  1. asfimport commented on Feb 23, 2021

    @asfimport
    Author

    Ian Cook / @ianmcook:
    FYI if you use Table$create it does not error but gives garbage in the 2nd... Nth rows 

    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 
  2. asfimport commented on Feb 23, 2021

    @asfimport
    Author
  3. asfimport commented on Apr 6, 2021

    @asfimport
    Author

    Ian Cook / @ianmcook:
    Table$create now errors instead of returning garbage data (ARROW-12155)

  4. asfimport commented on Jun 16, 2021

    @asfimport
    Author

    Neal Richardson / @nealrichardson:
    Issue resolved by pull request 10269
    #10269

  5. added this to the 5.0.0 milestone on Jan 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions