]> git.proxmox.com Git - ceph.git/blob - ceph/src/arrow/c_glib/arrow-glib/basic-array.hpp
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / c_glib / arrow-glib / basic-array.hpp
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "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,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20 #pragma once
21
22 #include <arrow/api.h>
23
24 #include <arrow-glib/basic-array.h>
25
26 arrow::EqualOptions *
27 garrow_equal_options_get_raw(GArrowEqualOptions *equal_options);
28
29 GArrowArray *
30 garrow_array_new_raw(std::shared_ptr<arrow::Array> *arrow_array);
31 GArrowArray *
32 garrow_array_new_raw(std::shared_ptr<arrow::Array> *arrow_array,
33 const gchar *first_property_name,
34 ...);
35 GArrowArray *
36 garrow_array_new_raw_valist(std::shared_ptr<arrow::Array> *arrow_array,
37 const gchar *first_property_name,
38 va_list args);
39 GArrowExtensionArray *
40 garrow_extension_array_new_raw(std::shared_ptr<arrow::Array> *arrow_array,
41 GArrowArray *storage);
42 std::shared_ptr<arrow::Array>
43 garrow_array_get_raw(GArrowArray *array);
44
45 template <typename DataType>
46 inline std::shared_ptr<typename arrow::TypeTraits<DataType>::ArrayType>
47 garrow_array_get_raw(GArrowArray *array) {
48 auto arrow_array = garrow_array_get_raw(array);
49 return std::static_pointer_cast<typename arrow::TypeTraits<DataType>::ArrayType>(arrow_array);
50 }