Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin' into support-net-write-read-set…
Browse files Browse the repository at this point in the history
…tings
  • Loading branch information
slvrtrn committed Jan 15, 2024
2 parents 8ad6b03 + 61889fa commit be09a41
Show file tree
Hide file tree
Showing 348 changed files with 3,559 additions and 2,148 deletions.
10 changes: 5 additions & 5 deletions base/base/Decimal.h
Expand Up @@ -99,7 +99,7 @@ class DateTime64 : public Decimal64
};
}

constexpr DB::UInt64 max_uint_mask = std::numeric_limits<DB::UInt64>::max();
constexpr UInt64 max_uint_mask = std::numeric_limits<UInt64>::max();

namespace std
{
Expand All @@ -114,8 +114,8 @@ namespace std
{
size_t operator()(const DB::Decimal128 & x) const
{
return std::hash<DB::Int64>()(x.value >> 64)
^ std::hash<DB::Int64>()(x.value & max_uint_mask);
return std::hash<Int64>()(x.value >> 64)
^ std::hash<Int64>()(x.value & max_uint_mask);
}
};

Expand All @@ -134,8 +134,8 @@ namespace std
size_t operator()(const DB::Decimal256 & x) const
{
// FIXME temp solution
return std::hash<DB::Int64>()(static_cast<DB::Int64>(x.value >> 64 & max_uint_mask))
^ std::hash<DB::Int64>()(static_cast<DB::Int64>(x.value & max_uint_mask));
return std::hash<Int64>()(static_cast<Int64>(x.value >> 64 & max_uint_mask))
^ std::hash<Int64>()(static_cast<Int64>(x.value & max_uint_mask));
}
};
}
29 changes: 4 additions & 25 deletions base/base/types.h
Expand Up @@ -3,40 +3,19 @@
#include <cstdint>
#include <string>

using Int8 = int8_t;
using Int16 = int16_t;
using Int32 = int32_t;
using Int64 = int64_t;

#ifndef __cpp_char8_t
using char8_t = unsigned char;
#endif

/// This is needed for more strict aliasing. https://godbolt.org/z/xpJBSb https://stackoverflow.com/a/57453713
using UInt8 = char8_t;

using UInt16 = uint16_t;
using UInt32 = uint32_t;
using UInt64 = uint64_t;

using String = std::string;

namespace DB
{

using UInt8 = ::UInt8;
using UInt16 = ::UInt16;
using UInt32 = ::UInt32;
using UInt64 = ::UInt64;

using Int8 = ::Int8;
using Int16 = ::Int16;
using Int32 = ::Int32;
using Int64 = ::Int64;
using Int8 = int8_t;
using Int16 = int16_t;
using Int32 = int32_t;
using Int64 = int64_t;

using Float32 = float;
using Float64 = double;

using String = std::string;

}
1 change: 1 addition & 0 deletions cmake/sanitize.cmake
Expand Up @@ -82,3 +82,4 @@ if (SANITIZE_COVERAGE)
endif()

set (WITHOUT_COVERAGE_FLAGS "-fno-profile-instr-generate -fno-coverage-mapping -fno-sanitize-coverage=trace-pc-guard,pc-table")
set (WITHOUT_COVERAGE_FLAGS_LIST -fno-profile-instr-generate -fno-coverage-mapping -fno-sanitize-coverage=trace-pc-guard,pc-table)
3 changes: 3 additions & 0 deletions contrib/jemalloc-cmake/CMakeLists.txt
Expand Up @@ -161,6 +161,9 @@ target_include_directories(_jemalloc SYSTEM PRIVATE

target_compile_definitions(_jemalloc PRIVATE -DJEMALLOC_NO_PRIVATE_NAMESPACE)

# Because our coverage callbacks call malloc, and recursive call of malloc could not work.
target_compile_options(_jemalloc PRIVATE ${WITHOUT_COVERAGE_FLAGS_LIST})

if (CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG")
target_compile_definitions(_jemalloc PRIVATE
-DJEMALLOC_DEBUG=1
Expand Down
10 changes: 1 addition & 9 deletions docker/test/stateful/Dockerfile
Expand Up @@ -11,14 +11,6 @@ RUN apt-get update -y \
npm \
&& apt-get clean

COPY s3downloader /s3downloader

ENV S3_URL="https://clickhouse-datasets.s3.amazonaws.com"
ENV DATASETS="hits visits"

# The following is already done in clickhouse/stateless-test
# RUN npm install -g azurite
# RUN npm install tslib

COPY create.sql /
COPY run.sh /
CMD ["/bin/bash", "/run.sh"]

0 comments on commit be09a41

Please sign in to comment.