mirror of
https://github.com/apache/arrow.git
synced 2026-10-28 16:47:19 +08:00
update
This commit is contained in:
1 parent
5178ee7513
commit
d590c8a620
2 files changed
+18
-3
No files matched your search
@@ -7,8 +7,8 @@ from libcpp.memory cimport shared_ptr, unique_ptr, make_shared
|
||||
from libcpp.string cimport string as c_string
|
||||
from libc.stdint cimport int64_t, uint8_t
|
||||
|
||||
from pyarrow.lib cimport Buffer
|
||||
from pyarrow.includes.libarrow cimport CBuffer
|
||||
from pyarrow.lib cimport Buffer, NativeFile
|
||||
from pyarrow.includes.libarrow cimport CBuffer, CFixedSizeBufferWrite
|
||||
|
||||
cdef extern from "arrow/api.h" namespace "arrow" nogil:
|
||||
# We can later add more of the common status factory methods as needed
|
||||
@@ -27,6 +27,16 @@ cdef extern from "arrow/api.h" namespace "arrow" nogil:
|
||||
c_bool IsNotImplemented()
|
||||
c_bool IsTypeError()
|
||||
|
||||
|
||||
|
||||
cdef class FixedSizeBufferOutputStream(NativeFile):
|
||||
|
||||
def __cinit__(self, Buffer buffer):
|
||||
self.wr_file.reset(new CFixedSizeBufferWrite(buffer.buffer))
|
||||
self.is_readable = 0
|
||||
self.is_writeable = 1
|
||||
self.is_open = True
|
||||
|
||||
cdef extern from "plasma/common.h" nogil:
|
||||
|
||||
cdef cppclass CUniqueID" UniqueID":
|
||||
@@ -47,6 +57,8 @@ cdef extern from "plasma/client.h" nogil:
|
||||
CStatus Create(const CUniqueID& object_id, int64_t data_size, uint8_t* metadata,
|
||||
int64_t metadata_size, uint8_t** data)
|
||||
|
||||
CStatus Seal(const CUniqueID& object_id)
|
||||
|
||||
CStatus Disconnect()
|
||||
|
||||
cdef class ObjectID:
|
||||
@@ -81,7 +93,7 @@ cdef class PlasmaClient:
|
||||
return result
|
||||
|
||||
def seal(self, ObjectID object_id):
|
||||
self.client.get().Seal(object_id)
|
||||
self.client.get().Seal(object_id.data)
|
||||
|
||||
def disconnect(self):
|
||||
self.client.get().Disconnect()
|
||||
@@ -559,6 +559,9 @@ cdef extern from "arrow/io/memory.h" namespace "arrow::io" nogil:
|
||||
CMockOutputStream()
|
||||
int64_t GetExtentBytesWritten()
|
||||
|
||||
cdef cppclass CFixedSizeBufferWrite" arrow::io::FixedSizeBufferWriter"(WriteableFile):
|
||||
CFixedSizeBufferWrite(const shared_ptr[CBuffer]& buffer)
|
||||
|
||||
|
||||
cdef extern from "arrow/ipc/api.h" namespace "arrow::ipc" nogil:
|
||||
enum MessageType" arrow::ipc::Message::Type":
|
||||
|
||||
Reference in new issue
Block a user