diff --git a/CMakeLists.txt b/CMakeLists.txt index f58df9bc0..f053d6b23 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ project(Iceberg DESCRIPTION "Iceberg C++ Project" LANGUAGES CXX) -set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) diff --git a/LICENSE b/LICENSE index c1b9df28b..f97d28dfe 100644 --- a/LICENSE +++ b/LICENSE @@ -202,34 +202,6 @@ -------------------------------------------------------------------------------- -The file src/iceberg/expected.h contains code adapted from - -https://github.com/zeus-cpp/expected - -with the following license (MIT) - -Copyright (c) 2024 zeus-cpp - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - --------------------------------------------------------------------------------- - 3rdparty dependency nlohmann-json is statically linked in certain binary distributions. nlohmann-json has the following license: diff --git a/NOTICE b/NOTICE index b287ab0ce..cbaf3e597 100644 --- a/NOTICE +++ b/NOTICE @@ -4,10 +4,6 @@ Copyright 2024-2025 The Apache Software Foundation This product includes software developed at The Apache Software Foundation (http://www.apache.org/). -This product includes code from zeus-cpp - * Copyright (c) 2024 zeus-cpp - * https://github.com/zeus-cpp/expected - This product includes code from smhasher * MurmurHash3 was written by Austin Appleby, and is placed in the public * domain. The author hereby disclaims copyright to this source code. diff --git a/README.md b/README.md index 1c42a5725..37fa9ca45 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ C++ implementation of [Apache Iceberg™](https://iceberg.apache.org/). ## Requirements - CMake 3.25 or higher -- C++20 compliant compiler +- C++23 compliant compiler ## Build diff --git a/cmake_modules/IcebergThirdpartyToolchain.cmake b/cmake_modules/IcebergThirdpartyToolchain.cmake index 9d657a77d..6505daa26 100644 --- a/cmake_modules/IcebergThirdpartyToolchain.cmake +++ b/cmake_modules/IcebergThirdpartyToolchain.cmake @@ -99,7 +99,7 @@ function(resolve_arrow_dependency) fetchcontent_declare(VendoredArrow ${FC_DECLARE_COMMON_OPTIONS} GIT_REPOSITORY https://github.com/apache/arrow.git - GIT_TAG 5f0aeb5de53fb25b59a52661a80071faef99a4a4 + GIT_TAG f12356adaaabea86638407e995e73215dbb58bb2 #URL ${ARROW_SOURCE_URL} #URL_HASH "SHA256=${ICEBERG_ARROW_BUILD_SHA256_CHECKSUM}" SOURCE_SUBDIR diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index c36afa44f..3e178a80b 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -20,7 +20,7 @@ cmake_minimum_required(VERSION 3.25) project(example) -set(CMAKE_CXX_STANDARD 20) +set(CMAKE_CXX_STANDARD 23) find_package(Iceberg CONFIG REQUIRED) diff --git a/src/iceberg/CMakeLists.txt b/src/iceberg/CMakeLists.txt index 4fb0d5429..1f2803f2a 100644 --- a/src/iceberg/CMakeLists.txt +++ b/src/iceberg/CMakeLists.txt @@ -45,7 +45,6 @@ set(ICEBERG_SOURCES type.cc util/murmurhash3_internal.cc util/timepoint.cc - util/unreachable.cc util/gzip_internal.cc) set(ICEBERG_STATIC_BUILD_INTERFACE_LIBS) diff --git a/src/iceberg/arrow/arrow_error_transform_internal.h b/src/iceberg/arrow/arrow_error_transform_internal.h index 60ff72b42..e33df4181 100644 --- a/src/iceberg/arrow/arrow_error_transform_internal.h +++ b/src/iceberg/arrow/arrow_error_transform_internal.h @@ -38,8 +38,8 @@ inline ErrorKind ToErrorKind(const ::arrow::Status& status) { #define ICEBERG_ARROW_ASSIGN_OR_RETURN_IMPL(result_name, lhs, rexpr, error_transform) \ auto&& result_name = (rexpr); \ if (!result_name.ok()) { \ - return unexpected{{.kind = error_transform(result_name.status()), \ - .message = result_name.status().ToString()}}; \ + return std::unexpected{{.kind = error_transform(result_name.status()), \ + .message = result_name.status().ToString()}}; \ } \ lhs = std::move(result_name).ValueOrDie(); @@ -51,7 +51,7 @@ inline ErrorKind ToErrorKind(const ::arrow::Status& status) { do { \ auto&& _status = (expr); \ if (!_status.ok()) { \ - return unexpected{ \ + return std::unexpected{ \ {.kind = ToErrorKind(_status), .message = _status.ToString()}}; \ } \ } while (0) diff --git a/src/iceberg/avro/avro_reader.cc b/src/iceberg/avro/avro_reader.cc index 0ec6d0869..29b42b79b 100644 --- a/src/iceberg/avro/avro_reader.cc +++ b/src/iceberg/avro/avro_reader.cc @@ -227,6 +227,8 @@ class AvroReader::Impl { std::unique_ptr context_; }; +AvroReader::~AvroReader() = default; + Result> AvroReader::Next() { return impl_->Next(); } Result AvroReader::Schema() { return impl_->Schema(); } diff --git a/src/iceberg/avro/avro_reader.h b/src/iceberg/avro/avro_reader.h index 9427f5423..a5fc91489 100644 --- a/src/iceberg/avro/avro_reader.h +++ b/src/iceberg/avro/avro_reader.h @@ -29,7 +29,7 @@ class ICEBERG_BUNDLE_EXPORT AvroReader : public Reader { public: AvroReader() = default; - ~AvroReader() override = default; + ~AvroReader() override; Status Open(const ReaderOptions& options) final; diff --git a/src/iceberg/catalog/in_memory_catalog.cc b/src/iceberg/catalog/in_memory_catalog.cc index 3e32ddc75..67e2b0c3f 100644 --- a/src/iceberg/catalog/in_memory_catalog.cc +++ b/src/iceberg/catalog/in_memory_catalog.cc @@ -22,7 +22,6 @@ #include #include // IWYU pragma: keep #include -#include #include #include "iceberg/exception.h" @@ -174,7 +173,7 @@ Result InMemoryNamespace::NamespaceExists(const Namespace& namespace_ident if (ns.error().kind == ErrorKind::kNoSuchNamespace) { return false; } - return unexpected(ns.error()); + return std::unexpected(ns.error()); } Result> InMemoryNamespace::ListNamespaces( diff --git a/src/iceberg/expected.h b/src/iceberg/expected.h deleted file mode 100644 index 723b28259..000000000 --- a/src/iceberg/expected.h +++ /dev/null @@ -1,2358 +0,0 @@ -/* - * MIT License - * - * Copyright (c) 2024 zeus-cpp - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all - * copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#pragma once - -#include -#include -#include -#include - -#include "iceberg/iceberg_export.h" - -// NOLINTBEGIN - -namespace iceberg { - -namespace expected_detail { - -template class Template> -inline constexpr bool is_specialization_v = - false; // true if and only if T is a specialization of Template -template