Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MATLAB] Add TimestampArray support to RecordBatch #36359

Closed
sgilmore10 opened this issue Jun 28, 2023 · 1 comment · Fixed by #36361
Closed

[MATLAB] Add TimestampArray support to RecordBatch #36359

sgilmore10 opened this issue Jun 28, 2023 · 1 comment · Fixed by #36361

Comments

@sgilmore10
Copy link
Member

Describe the enhancement requested

Now that we have a TimestampArray class in MATLAB, we should add support for TimestampArray columns in RecordBatch.

Component(s)

MATLAB

@sgilmore10
Copy link
Member Author

take

kou pushed a commit that referenced this issue Jun 28, 2023
…36361)

### Rationale for this change

Now that we have a `TimestampArray` class in MATLAB, we should add support for `TimestampArray` columns in `RecordBatch`.

### What changes are included in this PR?

You can now create a `RecordBatch` with a `TimestampArray` column:

```matlab
>> Date = datetime(2023, 6, 28) + days(0:2)';
>> DayNumber = weekday(Date);
>> t  = table(Date, DayNumber)

t =

  3×2 table

       Date        DayNumber
    ___________    _________

    28-Jun-2023        4    
    29-Jun-2023        5    
    30-Jun-2023        6    

>> rb = arrow.tabular.RecordBatch(t)

rb = 

Date:   [
    2023-06-28 00:00:00.000000,
    2023-06-29 00:00:00.000000,
    2023-06-30 00:00:00.000000
  ]
DayNumber:   [
    4,
    5,
    6
  ]

```

### Are these changes tested?

Yes, the `SupportedTypes` unit test in `tRecordBatch.m` was updated to verify we support creating record batches with timestamp data.

### Are there any user-facing changes?

1. Users can create record batches with timestamp data now.

* Closes: #36359

Authored-by: Sarah Gilmore <sgilmore@mathworks.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou kou added this to the 13.0.0 milestone Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants