diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 394c839d3..6d4dea441 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -105,7 +105,7 @@ jobs: echo "|" echo "| Run: " echo "|" - echo "| make clformat" + echo "| make graphar-clformat" echo "|" echo "| to fix this error." echo "|" @@ -124,7 +124,7 @@ jobs: echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" echo "| cpplint failures found! Run: " echo "|" - echo "| make vineyard_cpplint" + echo "| make graphar-cpplint" echo "|" echo "| to fix this error." echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 23840e8d5..bd7cfd305 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -197,7 +197,9 @@ if (${Arrow_VERSION} VERSION_GREATER_EQUAL "12.0.0") endif() # Check if ORC is enabled. if (NOT ${ARROW_ORC}) - message(FATAL_ERROR "apache-arrow ORC extension is required.") + message(WARNING "apache-arrow is built without ORC extension, ORC related functionalities will be disabled.") +else() + add_definitions(-DARROW_ORC) # Add macro, otherwise inconsistent in build phase on ubuntu. endif() find_package(Parquet QUIET) diff --git a/cpp/src/graphar/filesystem.cc b/cpp/src/graphar/filesystem.cc index 03c03e37e..eb526d761 100644 --- a/cpp/src/graphar/filesystem.cc +++ b/cpp/src/graphar/filesystem.cc @@ -17,7 +17,9 @@ * under the License. */ +#ifdef ARROW_ORC #include "arrow/adapters/orc/adapter.h" +#endif #include "arrow/api.h" #include "arrow/csv/api.h" #include "arrow/dataset/api.h" @@ -89,10 +91,12 @@ std::shared_ptr FileSystem::GetFileFormat( return std::make_shared(); case PARQUET: return std::make_shared(); - case ORC: - return std::make_shared(); case JSON: return std::make_shared(); +#ifdef ARROW_ORC + case ORC: + return std::make_shared(); +#endif default: return nullptr; } @@ -233,6 +237,7 @@ Status FileSystem::WriteTableToFile(const std::shared_ptr& table, builder.build(), parquet::default_arrow_writer_properties())); break; } +#ifdef ARROW_ORC case FileType::ORC: { auto writer_options = arrow::adapters::orc::WriteOptions(); writer_options.compression = arrow::Compression::type::ZSTD; @@ -243,6 +248,7 @@ Status FileSystem::WriteTableToFile(const std::shared_ptr& table, RETURN_NOT_ARROW_OK(writer->Close()); break; } +#endif default: return Status::Invalid( "Unsupported file type: ", FileTypeToString(file_type), " for wrting."); diff --git a/cpp/src/graphar/reader_util.cc b/cpp/src/graphar/reader_util.cc index 9e23899db..0048c2bcc 100644 --- a/cpp/src/graphar/reader_util.cc +++ b/cpp/src/graphar/reader_util.cc @@ -17,7 +17,9 @@ * under the License. */ +#ifdef ARROW_ORC #include "arrow/adapters/orc/adapter.h" +#endif #include "arrow/api.h" #include "arrow/csv/api.h" #include "arrow/filesystem/api.h" diff --git a/cpp/test/test_arrow_chunk_writer.cc b/cpp/test/test_arrow_chunk_writer.cc index 682c1a1ae..cc35e25e6 100644 --- a/cpp/test/test_arrow_chunk_writer.cc +++ b/cpp/test/test_arrow_chunk_writer.cc @@ -22,7 +22,9 @@ #include #include +#ifdef ARROW_ORC #include "arrow/adapters/orc/adapter.h" +#endif #include "arrow/api.h" #include "arrow/csv/api.h" #include "arrow/filesystem/api.h" @@ -112,6 +114,7 @@ TEST_CASE_METHOD(GlobalFixture, "TestVertexPropertyWriter") { auto pg3 = vertex_info->GetPropertyGroup("id"); REQUIRE(writer->WriteTable(tmp_table, pg3, 0).IsTypeError()); +#ifdef ARROW_ORC SECTION("TestOrcParquetReader") { arrow::Status st; arrow::MemoryPool* pool = arrow::default_memory_pool(); @@ -150,6 +153,7 @@ TEST_CASE_METHOD(GlobalFixture, "TestVertexPropertyWriter") { REQUIRE(table1->GetColumnByName("gender")->ToString() == table2->GetColumnByName("gender")->ToString()); } +#endif SECTION("TestEdgeChunkWriter") { arrow::Status st; diff --git a/cpp/test/test_builder.cc b/cpp/test/test_builder.cc index 7fecd9c63..63ebebc8d 100644 --- a/cpp/test/test_builder.cc +++ b/cpp/test/test_builder.cc @@ -24,7 +24,6 @@ #include #include -#include "arrow/adapters/orc/adapter.h" #include "arrow/api.h" #include "arrow/csv/api.h" #include "arrow/filesystem/api.h"