Skip to content

Commit

Permalink
Clean up a little
Browse files Browse the repository at this point in the history
  • Loading branch information
JerAguilon committed Nov 14, 2023
1 parent 705111e commit 987845a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
4 changes: 0 additions & 4 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -385,15 +385,11 @@ configure_file(
"${PROJECT_SOURCE_DIR}/${PYARROW_CPP_SOURCE_DIR}/pyarrow_config.h"
ESCAPE_QUOTES
)
# install(FILES "${ARROW_BINARY_DIR}/src/arrow/util/config.h"
# DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/arrow/util")
message(" Source dir ${PYARROW_CPP_SOURCE_DIR}")
message(" Include dir ${CMAKE_INSTALL_INCLUDEDIR}")
install(FILES "${PYARROW_CPP_SOURCE_DIR}/pyarrow_config.h"
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/arrow/python")

# message(FATAL_ERROR "DONE")

add_library(arrow_python SHARED ${PYARROW_CPP_SRCS})
message("PYARROW CPP SOURCE DIR ${PYARROW_CPP_SOURCE_DIR}")
message("PYARROW CPP SOURCES ${PYARROW_CPP_SRCS}")
Expand Down
6 changes: 4 additions & 2 deletions python/pyarrow/_dataset.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ from libcpp cimport bool

import pyarrow as pa
from pyarrow.lib cimport *
from pyarrow.lib import ArrowTypeError, frombytes, tobytes, _pac, _forbid_instantiation
from pyarrow.lib import ArrowTypeError, frombytes, tobytes, _pac
from pyarrow.includes.libarrow_dataset cimport *
from pyarrow._compute cimport Expression, _bind
from pyarrow._acero cimport ExecNodeOptions
from pyarrow._compute cimport Expression, _bind
from pyarrow._compute import _forbid_instantiation
from pyarrow._fs cimport FileSystem, FileSelector
from pyarrow._csv cimport (
ConvertOptions, ParseOptions, ReadOptions, WriteOptions)
Expand Down Expand Up @@ -146,6 +147,7 @@ cdef str _wrap_segment_encoding(CSegmentEncoding segment_encoding):

cdef Expression _true = Expression._scalar(True)


cdef class Dataset(_Weakrefable):
"""
Collection of data fragments and potentially child datasets.
Expand Down
1 change: 1 addition & 0 deletions python/pyarrow/_dataset_parquet.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ from pyarrow._parquet cimport (
FileMetaData,
)


try:
from pyarrow._dataset_parquet_encryption import (
set_encryption_config, set_decryption_config
Expand Down
7 changes: 1 addition & 6 deletions python/pyarrow/lib.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@ from cpython cimport PyObject
from libcpp cimport nullptr, bool as c_bool
from libcpp.cast cimport dynamic_cast
from libcpp.memory cimport dynamic_pointer_cast
from pyarrow.lib cimport *
from pyarrow.includes.common cimport *
from pyarrow.includes.libarrow cimport *
from pyarrow.includes.libarrow_python cimport *


# Will be available in Cython 3, not backported
# ref: https://github.com/cython/cython/issues/3293#issuecomment-1223058101
cdef extern from "<optional>" namespace "std" nogil:
Expand Down Expand Up @@ -640,9 +638,6 @@ cdef public object pyarrow_wrap_tensor(const shared_ptr[CTensor]& sp_tensor)
cdef public object pyarrow_wrap_batch(const shared_ptr[CRecordBatch]& cbatch)
cdef public object pyarrow_wrap_table(const shared_ptr[CTable]& ctable)

# TODO: extract
# cdef public object pyarrow_wrap_expression(const CExpression& expr)

# Unwrapping Python -> C++

cdef public shared_ptr[CBuffer] pyarrow_unwrap_buffer(object buffer)
Expand All @@ -666,6 +661,6 @@ cdef public shared_ptr[CSparseCSFTensor] pyarrow_unwrap_sparse_csf_tensor(
cdef public shared_ptr[CSparseCSRMatrix] pyarrow_unwrap_sparse_csr_matrix(
object sparse_tensor)
cdef public shared_ptr[CTensor] pyarrow_unwrap_tensor(object tensor)
cdef public shared_ptr[CRecordBatch] pyarrow_unwrap_batch(object batch)

cdef public shared_ptr[CRecordBatch] pyarrow_unwrap_batch(object batch)
cdef public shared_ptr[CTable] pyarrow_unwrap_table(object table)

0 comments on commit 987845a

Please sign in to comment.