Skip to content

Commit 0dde75b

Browse files
committed
Add arrow.c.export function
1 parent 5beffd0 commit 0dde75b

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

matlab/src/matlab/+arrow/+c/export.m

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
%EXPORT Export the given arrow array to the C Data Interface Format.
2+
3+
% Licensed to the Apache Software Foundation (ASF) under one or more
4+
% contributor license agreements. See the NOTICE file distributed with
5+
% this work for additional information regarding copyright ownership.
6+
% The ASF licenses this file to you under the Apache License, Version
7+
% 2.0 (the "License"); you may not use this file except in compliance
8+
% with the License. You may obtain a copy of the License at
9+
%
10+
% http://www.apache.org/licenses/LICENSE-2.0
11+
%
12+
% Unless required by applicable law or agreed to in writing, software
13+
% distributed under the License is distributed on an "AS IS" BASIS,
14+
% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
15+
% implied. See the License for the specific language governing
16+
% permissions and limitations under the License.
17+
18+
function [arrowArrayAddress, arrowSchemaAddress] = export(array)
19+
arguments
20+
array(1, 1) {arrow.array.Array}
21+
end
22+
addresses = array.exportToC();
23+
arrowArrayAddress = addresses.ArrowArrayAddress;
24+
arrowSchemaAddress = addresses.ArrowSchemaAddress;
25+
end

0 commit comments

Comments
 (0)