Skip to content
Closed
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
3 changes: 3 additions & 0 deletions clickhouse/base/sslsocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ void configureSSL(const clickhouse::SSLParams::ConfigurationType & configuration
SSL_CONF_CTX_set_ssl(conf_ctx, ssl);
else if (context)
SSL_CONF_CTX_set_ssl_ctx(conf_ctx, context);
else {
throw clickhouse::AssertionError("Either SSL or SSL_CTX should be provided");
}

for (const auto & kv : configuration) {
const int err = SSL_CONF_cmd(conf_ctx, kv.first.c_str(), (kv.second ? kv.second->c_str() : nullptr));
Expand Down
3 changes: 3 additions & 0 deletions clickhouse/columns/string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ ColumnFixedString::ColumnFixedString(size_t n)
{
}

ColumnFixedString::~ColumnFixedString()
{}

void ColumnFixedString::Append(std::string_view str) {
if (str.size() > string_size_) {
throw ValidationError("Expected string of length not greater than "
Expand Down
3 changes: 2 additions & 1 deletion clickhouse/columns/string.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class ColumnFixedString : public Column {
using ValueType = std::string_view;

explicit ColumnFixedString(size_t n);
~ColumnFixedString() override;

template <typename Values>
ColumnFixedString(size_t n, const Values & values)
Expand Down Expand Up @@ -76,7 +77,7 @@ class ColumnString : public Column {
using ValueType = std::string_view;

ColumnString();
~ColumnString();
~ColumnString() override;

explicit ColumnString(const std::vector<std::string> & data);
explicit ColumnString(std::vector<std::string>&& data);
Expand Down
24 changes: 0 additions & 24 deletions clickhouse/query.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,30 +10,6 @@

namespace clickhouse {

/**
* Settings of individual query.
*/
struct QuerySettings {
/// Maximum thread to use on the server-side to process a query. Default - let the server choose.
int max_threads = 0;
/// Compute min and max values of the result.
bool extremes = false;
/// Silently skip unavailable shards.
bool skip_unavailable_shards = false;
/// Write statistics about read rows, bytes, time elapsed, etc.
bool output_format_write_statistics = true;
/// Use client timezone for interpreting DateTime string values, instead of adopting server timezone.
bool use_client_time_zone = false;

// connect_timeout
// max_block_size
// distributed_group_by_no_merge = false
// strict_insert_defaults = 0
// network_compression_method = LZ4
// priority = 0
};


struct Profile {
uint64_t rows = 0;
uint64_t blocks = 0;
Expand Down
9 changes: 9 additions & 0 deletions ut/Column_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,15 @@ TYPED_TEST(GenericColumnTest, Swap) {
column_A->Swap(*column_B);

EXPECT_EQ(0u, column_A->Size());

{
// If there are any dandling pointers/references from column_B into column_A after Swap(),
// then filling column_A with new values would most likely overwrite/invalidate those
// and CompareRecursive below would fail.
this->AppendValues(column_A, this->GenerateValues(1));
column_A.reset();
}

EXPECT_TRUE(CompareRecursive(values, *column_B));
}

Expand Down