Skip to content

fix 3.0 compile error #369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 1 addition & 21 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,36 +23,16 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-20.04]
compiler: [clang-6, clang-10-libc++, gcc-7, gcc-8, gcc-9]
compiler: [clang-10-libc++]
ssl: [ssl_ON, ssl_OFF]
dependencies: [dependencies_BUILT_IN]

include:
- compiler: clang-6
COMPILER_INSTALL: clang-6.0 libc++-dev
C_COMPILER: clang-6.0
CXX_COMPILER: clang++-6.0

- compiler: clang-10-libc++
COMPILER_INSTALL: clang-10 libc++-dev
C_COMPILER: clang-10
CXX_COMPILER: clang++-10

- compiler: gcc-7
COMPILER_INSTALL: gcc-7 g++-7
C_COMPILER: gcc-7
CXX_COMPILER: g++-7

- compiler: gcc-8
COMPILER_INSTALL: gcc-8 g++-8
C_COMPILER: gcc-8
CXX_COMPILER: g++-8

- compiler: gcc-9
COMPILER_INSTALL: gcc-9 g++-9
C_COMPILER: gcc-9
CXX_COMPILER: g++-9

- ssl: ssl_ON
SSL_CMAKE_OPTION: -D WITH_OPENSSL=ON

Expand Down
1 change: 0 additions & 1 deletion .github/workflows/windows_mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ env:
BUILD_TYPE: Release
CLICKHOUSE_USER: clickhouse_cpp_cicd
CLICKHOUSE_PASSWORD: clickhouse_cpp_cicd

#
# CLICKHOUSE_HOST: localhost
# CLICKHOUSE_PORT: 9000
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CMAKE_MINIMUM_REQUIRED (VERSION 3.5.2)

LIST (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

INCLUDE (cpp17)
INCLUDE (cpp20)
INCLUDE (subdirs)
INCLUDE (openssl)
INCLUDE (version)
Expand All @@ -24,7 +24,7 @@ PROJECT (CLICKHOUSE-CLIENT
DESCRIPTION "ClickHouse C++ client library"
)

USE_CXX17 ()
USE_CXX20 ()
USE_OPENSSL ()

IF (CLICKHOUSE_CPP_CHECK_VERSION)
Expand Down
8 changes: 3 additions & 5 deletions clickhouse/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ SET ( clickhouse-cpp-lib-src
base/singleton.h
base/socket.h
base/sslsocket.h
base/string_utils.h
base/string_view.h


base/uuid.h
base/wire_format.h

Expand All @@ -61,7 +61,7 @@ SET ( clickhouse-cpp-lib-src
columns/ip6.h
columns/itemview.h
columns/lowcardinality.h
columns/lowcardinalityadaptor.h

columns/map.h
columns/nothing.h
columns/nullable.h
Expand All @@ -86,8 +86,6 @@ SET ( clickhouse-cpp-lib-src
if (MSVC)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
add_compile_options(/W4)
# remove in 3.0
add_compile_options(/wd4996)
else()
set(cxx_extra_wall "-Wempty-body -Wconversion -Wreturn-type -Wparentheses -Wuninitialized -Wunreachable-code -Wunused-function -Wunused-value -Wunused-variable")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${cxx_extra_wall}")
Expand Down
4 changes: 0 additions & 4 deletions clickhouse/base/compressed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ CompressedInput::CompressedInput(InputStream* input)

CompressedInput::~CompressedInput() {
if (!mem_.Exhausted()) {
#if __cplusplus < 201703L
if (!std::uncaught_exception()) {
#else
if (!std::uncaught_exceptions()) {
#endif
throw LZ4Error("some data was not read");
}
}
Expand Down
28 changes: 0 additions & 28 deletions clickhouse/base/string_utils.h

This file was deleted.

142 changes: 0 additions & 142 deletions clickhouse/base/string_view.h

This file was deleted.

5 changes: 1 addition & 4 deletions clickhouse/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -621,9 +621,6 @@ bool Client::Impl::ReadBlock(InputStream& input, Block* block) {
return false;
}

CreateColumnByTypeSettings create_column_settings;
create_column_settings.low_cardinality_as_wrapped_column = options_.backward_compatibility_lowcardinality_as_wrapped_column;

for (size_t i = 0; i < num_columns; ++i) {
std::string name;
std::string type;
Expand All @@ -634,7 +631,7 @@ bool Client::Impl::ReadBlock(InputStream& input, Block* block) {
return false;
}

if (ColumnRef col = CreateColumnByType(type, create_column_settings)) {
if (ColumnRef col = CreateColumnByType(type)) {
if (num_rows && !col->Load(&input, num_rows)) {
throw ProtocolError("can't load column '" + name + "' of type " + type);
}
Expand Down
9 changes: 0 additions & 9 deletions clickhouse/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,6 @@ struct ClientOptions {
DECLARE_FIELD(connection_recv_timeout, std::chrono::milliseconds, SetConnectionRecvTimeout, std::chrono::milliseconds(0));
DECLARE_FIELD(connection_send_timeout, std::chrono::milliseconds, SetConnectionSendTimeout, std::chrono::milliseconds(0));

/** It helps to ease migration of the old codebases, which can't afford to switch
* to using ColumnLowCardinalityT or ColumnLowCardinality directly,
* but still want to benefit from smaller on-wire LowCardinality bandwidth footprint.
*
* @see LowCardinalitySerializationAdaptor, CreateColumnByType
*/
[[deprecated("Makes implementation of LC(X) harder and code uglier. Will be removed in next major release (3.0) ")]]
DECLARE_FIELD(backward_compatibility_lowcardinality_as_wrapped_column, bool, SetBakcwardCompatibilityFeatureLowCardinalityAsWrappedColumn, false);

/** Set max size data to compress if compression enabled.
*
* Allows choosing tradeoff between RAM\CPU:
Expand Down
Loading