]> git.proxmox.com Git - ceph.git/blame - ceph/src/arrow/python/pyarrow/includes/libarrow_feather.pxd
import quincy 17.2.0
[ceph.git] / ceph / src / arrow / python / pyarrow / includes / libarrow_feather.pxd
CommitLineData
1d09f67e
TL
1# Licensed to the Apache Software Foundation (ASF) under one
2# or more contributor license agreements. See the NOTICE file
3# distributed with this work for additional information
4# regarding copyright ownership. The ASF licenses this file
5# to you under the Apache License, Version 2.0 (the
6# "License"); you may not use this file except in compliance
7# with the License. You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing,
12# software distributed under the License is distributed on an
13# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14# KIND, either express or implied. See the License for the
15# specific language governing permissions and limitations
16# under the License.
17
18# distutils: language = c++
19
20from pyarrow.includes.libarrow cimport (CCompressionType, CStatus, CTable,
21 COutputStream, CResult, shared_ptr,
22 vector, CRandomAccessFile, CSchema,
23 c_string)
24
25
26cdef extern from "arrow/ipc/api.h" namespace "arrow::ipc" nogil:
27 int kFeatherV1Version" arrow::ipc::feather::kFeatherV1Version"
28 int kFeatherV2Version" arrow::ipc::feather::kFeatherV2Version"
29
30 cdef cppclass CFeatherProperties" arrow::ipc::feather::WriteProperties":
31 int version
32 int chunksize
33 CCompressionType compression
34 int compression_level
35
36 CStatus WriteFeather" arrow::ipc::feather::WriteTable" \
37 (const CTable& table, COutputStream* out,
38 CFeatherProperties properties)
39
40 cdef cppclass CFeatherReader" arrow::ipc::feather::Reader":
41 @staticmethod
42 CResult[shared_ptr[CFeatherReader]] Open(
43 const shared_ptr[CRandomAccessFile]& file)
44 int version()
45 shared_ptr[CSchema] schema()
46
47 CStatus Read(shared_ptr[CTable]* out)
48 CStatus Read(const vector[int] indices, shared_ptr[CTable]* out)
49 CStatus Read(const vector[c_string] names, shared_ptr[CTable]* out)