Skip to content

Commit

Permalink
[Cpp]: fix opendal debug build and delete fragment bug (#99)
Browse files Browse the repository at this point in the history
Signed-off-by: sunby <[email protected]>
  • Loading branch information
sunby committed Dec 26, 2023
1 parent 76e506e commit 137cb5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion cpp/cmake/libopendal.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ function(build_opendal)
set(OPENDAL_BUILD_TYPE "debug")
else()
set(OPENDAL_BUILD_TYPE "release")
set(OPENDAL_BUILD_OPTS "--release")
endif()

ExternalProject_Add(
Expand All @@ -22,7 +23,7 @@ function(build_opendal)
PREFIX ${OPENDAL_PREFIX}
SOURCE_SUBDIR bindings/c
CONFIGURE_COMMAND echo "configure for opendal_ep"
BUILD_COMMAND cargo build --${OPENDAL_BUILD_TYPE}
BUILD_COMMAND cargo build ${OPENDAL_BUILD_OPTS}
BUILD_IN_SOURCE 1
INSTALL_COMMAND bash -c "cp ${OPENDAL_PREFIX}/src/opendal_ep/target/${OPENDAL_BUILD_TYPE}/${OPENDAL_NAME} ${OPENDAL_PREFIX}/lib/ && cp ${OPENDAL_PREFIX}/src/opendal_ep/bindings/c/include/opendal.h ${OPENDAL_PREFIX}/include/")

Expand Down
8 changes: 4 additions & 4 deletions cpp/src/file/delete_fragment.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright 2023 Zilliz
//
//
// Licensed 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.
Expand Down Expand Up @@ -46,7 +46,7 @@ Status DeleteFragment::Add(std::shared_ptr<arrow::RecordBatch> batch) {
Result<DeleteFragment> DeleteFragment::Make(std::shared_ptr<arrow::fs::FileSystem> fs,
std::shared_ptr<Schema> schema,
const Fragment& fragment) {
DeleteFragment delete_fragment;
DeleteFragment delete_fragment(fs, schema, fragment.id());

auto opts = std::make_shared<ReadOptions>();
opts->columns = schema->delete_schema()->field_names();
Expand Down

0 comments on commit 137cb5c

Please sign in to comment.