This repository was archived by the owner on May 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 191
PARQUET-712: Add library to read into Arrow memory #158
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
142a364
PARQUET-712: Add library to read into Arrow memory
xhochy 874b33d
Add boost libraries for Arrow
xhochy e0e1518
Build parquet_arrow in Travis
xhochy 251262a
Style fixes
xhochy 1d39a60
Import MemoryPool instead of declaring it
xhochy 45de044
Style fixes for IO
xhochy 3f3e24b
Fix templating problem
xhochy fc2c316
Style fixes
xhochy 62f0f88
Add static linkage
xhochy e55ab1f
verbose ctest output
xhochy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| # - Find ARROW (arrow/api.h, libarrow.a, libarrow.so) | ||
| # This module defines | ||
| # ARROW_INCLUDE_DIR, directory containing headers | ||
| # ARROW_LIBS, directory containing arrow libraries | ||
| # ARROW_STATIC_LIB, path to libarrow.a | ||
| # ARROW_SHARED_LIB, path to libarrow's shared library | ||
| # ARROW_FOUND, whether arrow has been found | ||
|
|
||
| set(ARROW_SEARCH_HEADER_PATHS | ||
| $ENV{ARROW_HOME}/include | ||
| ) | ||
|
|
||
| set(ARROW_SEARCH_LIB_PATH | ||
| $ENV{ARROW_HOME}/lib | ||
| ) | ||
|
|
||
| find_path(ARROW_INCLUDE_DIR arrow/array.h PATHS | ||
| ${ARROW_SEARCH_HEADER_PATHS} | ||
| # make sure we don't accidentally pick up a different version | ||
| NO_DEFAULT_PATH | ||
| ) | ||
|
|
||
| find_library(ARROW_LIB_PATH NAMES arrow | ||
| PATHS | ||
| ${ARROW_SEARCH_LIB_PATH} | ||
| NO_DEFAULT_PATH) | ||
|
|
||
| find_library(ARROW_IO_LIB_PATH NAMES arrow_io | ||
| PATHS | ||
| ${ARROW_SEARCH_LIB_PATH} | ||
| NO_DEFAULT_PATH) | ||
|
|
||
| if (ARROW_INCLUDE_DIR AND ARROW_LIB_PATH) | ||
| set(ARROW_FOUND TRUE) | ||
| set(ARROW_LIB_NAME libarrow) | ||
| set(ARROW_IO_LIB_NAME libarrow_io) | ||
|
|
||
| set(ARROW_LIBS ${ARROW_SEARCH_LIB_PATH}) | ||
| set(ARROW_STATIC_LIB ${ARROW_SEARCH_LIB_PATH}/${ARROW_LIB_NAME}.a) | ||
| set(ARROW_SHARED_LIB ${ARROW_LIBS}/${ARROW_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) | ||
|
|
||
| set(ARROW_IO_STATIC_LIB ${ARROW_SEARCH_LIB_PATH}/${ARROW_IO_LIB_NAME}.a) | ||
| set(ARROW_IO_SHARED_LIB ${ARROW_LIBS}/${ARROW_IO_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}) | ||
| if (NOT Arrow_FIND_QUIETLY) | ||
| message(STATUS "Found the Arrow core library: ${ARROW_LIB_PATH}") | ||
| message(STATUS "Found the Arrow IO library: ${ARROW_IO_LIB_PATH}") | ||
| endif () | ||
| else () | ||
| if (NOT Arrow_FIND_QUIETLY) | ||
| set(ARROW_ERR_MSG "Could not find the Arrow library. Looked for headers") | ||
| set(ARROW_ERR_MSG "${ARROW_ERR_MSG} in ${ARROW_SEARCH_HEADER_PATHS}, and for libs") | ||
| set(ARROW_ERR_MSG "${ARROW_ERR_MSG} in ${ARROW_SEARCH_LIB_PATH}") | ||
| if (Arrow_FIND_REQUIRED) | ||
| message(FATAL_ERROR "${ARROW_ERR_MSG}") | ||
| else (Arrow_FIND_REQUIRED) | ||
| message(STATUS "${ARROW_ERR_MSG}") | ||
| endif (Arrow_FIND_REQUIRED) | ||
| endif () | ||
| set(ARROW_FOUND FALSE) | ||
| endif () | ||
|
|
||
| mark_as_advanced( | ||
| ARROW_FOUND | ||
| ARROW_INCLUDE_DIR | ||
| ARROW_LIBS | ||
| ARROW_STATIC_LIB | ||
| ARROW_SHARED_LIB | ||
| ARROW_IO_STATIC_LIB | ||
| ARROW_IO_SHARED_LIB | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| # ---------------------------------------------------------------------- | ||
| # parquet_arrow : Arrow <-> Parquet adapter | ||
|
|
||
| set(PARQUET_ARROW_SRCS | ||
| io.cc | ||
| reader.cc | ||
| schema.cc | ||
| writer.cc | ||
| ) | ||
|
|
||
| add_library(parquet_arrow_objlib OBJECT | ||
| ${PARQUET_ARROW_SRCS} | ||
| ) | ||
|
|
||
| # SET_TARGET_PROPERTIES(parquet_arrow PROPERTIES LINKER_LANGUAGE CXX) | ||
|
|
||
| if (PARQUET_BUILD_SHARED) | ||
| add_library(parquet_arrow_shared SHARED $<TARGET_OBJECTS:parquet_arrow_objlib>) | ||
| set_target_properties(parquet_arrow_shared | ||
| PROPERTIES | ||
| LIBRARY_OUTPUT_DIRECTORY "${BUILD_OUTPUT_ROOT_DIRECTORY}" | ||
| LINK_FLAGS "${SHARED_LINK_FLAGS}" | ||
| OUTPUT_NAME "parquet_arrow") | ||
| target_link_libraries(parquet_arrow_shared | ||
| arrow | ||
| arrow_io | ||
| parquet_shared) | ||
| if (APPLE) | ||
| set_target_properties(parquet_arrow_shared | ||
| PROPERTIES | ||
| BUILD_WITH_INSTALL_RPATH ON | ||
| INSTALL_NAME_DIR "@rpath") | ||
| endif() | ||
| endif() | ||
|
|
||
| if (PARQUET_BUILD_STATIC) | ||
| add_library(parquet_arrow_static STATIC $<TARGET_OBJECTS:parquet_arrow_objlib>) | ||
| set_target_properties(parquet_arrow_static | ||
| PROPERTIES | ||
| LIBRARY_OUTPUT_DIRECTORY "${BUILD_OUTPUT_ROOT_DIRECTORY}" | ||
| OUTPUT_NAME "parquet_arrow") | ||
| target_link_libraries(parquet_arrow_static | ||
| arrow_static | ||
| arrow_static | ||
| parquet_static) | ||
| install(TARGETS parquet_arrow_static | ||
| ARCHIVE DESTINATION lib | ||
| LIBRARY DESTINATION lib) | ||
| endif() | ||
|
|
||
| ADD_PARQUET_TEST(arrow-schema-test) | ||
| ADD_PARQUET_TEST(arrow-io-test) | ||
| ADD_PARQUET_TEST(arrow-reader-writer-test) | ||
|
|
||
| if (PARQUET_BUILD_STATIC) | ||
| ADD_PARQUET_LINK_LIBRARIES(arrow-schema-test parquet_arrow_static) | ||
| ADD_PARQUET_LINK_LIBRARIES(arrow-io-test parquet_arrow_static) | ||
| ADD_PARQUET_LINK_LIBRARIES(arrow-reader-writer-test parquet_arrow_static) | ||
| else() | ||
| ADD_PARQUET_LINK_LIBRARIES(arrow-schema-test parquet_arrow_shared) | ||
| ADD_PARQUET_LINK_LIBRARIES(arrow-io-test parquet_arrow_shared) | ||
| ADD_PARQUET_LINK_LIBRARIES(arrow-reader-writer-test parquet_arrow_shared) | ||
| endif() | ||
|
|
||
| # Headers: top level | ||
| install(FILES | ||
| io.h | ||
| reader.h | ||
| schema.h | ||
| utils.h | ||
| writer.h | ||
| DESTINATION include/parquet/arrow) | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO: building static
libparquet_arrow.a