Merge pull request #16921 from ClickHouse/try-fix-ci-3

Try to fix ci
This commit is contained in:
Nikolai Kochetov 2020-11-12 13:42:28 +03:00 committed by GitHub
commit b8345f209f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 61 additions and 5 deletions

View File

@ -1,5 +1,6 @@
#include <IO/LZMADeflatingWriteBuffer.h>
#if !defined(ARCADIA_BUILD)
namespace DB
{
@ -123,3 +124,5 @@ void LZMADeflatingWriteBuffer::finish()
} while (lstr.avail_out == 0);
}
}
#endif

View File

@ -3,10 +3,16 @@
#include <IO/BufferWithOwnMemory.h>
#include <IO/WriteBuffer.h>
#include <lzma.h>
#if !defined(ARCADIA_BUILD)
#include <lzma.h> // Y_IGNORE
#endif
namespace DB
{
#if !defined(ARCADIA_BUILD)
/// Performs compression using lzma library and writes compressed data to out_ WriteBuffer.
class LZMADeflatingWriteBuffer : public BufferWithOwnMemory<WriteBuffer>
{
@ -29,4 +35,27 @@ private:
lzma_stream lstr;
bool finished = false;
};
#else
namespace ErrorCodes
{
extern const int NOT_IMPLEMENTED;
}
class LZMADeflatingWriteBuffer : public BufferWithOwnMemory<WriteBuffer>
{
public:
LZMADeflatingWriteBuffer(
std::unique_ptr<WriteBuffer> out_ [[maybe_unused]],
int compression_level [[maybe_unused]],
size_t buf_size [[maybe_unused]] = DBMS_DEFAULT_BUFFER_SIZE,
char * existing_memory [[maybe_unused]] = nullptr,
size_t alignment [[maybe_unused]] = 0)
{
throw Exception("LZMADeflatingWriteBuffer is not implemented for arcadia build", ErrorCodes::NOT_IMPLEMENTED);
}
};
#endif
}

View File

@ -1,5 +1,6 @@
#include <IO/LZMAInflatingReadBuffer.h>
#if !defined(ARCADIA_BUILD)
namespace DB
{
namespace ErrorCodes
@ -87,3 +88,4 @@ bool LZMAInflatingReadBuffer::nextImpl()
return true;
}
}
#endif

View File

@ -3,14 +3,14 @@
#include <IO/BufferWithOwnMemory.h>
#include <IO/ReadBuffer.h>
#include <lzma.h>
#if !defined(ARCADIA_BUILD)
#include <lzma.h> // Y_IGNORE
#endif
namespace DB
{
namespace ErrorCodes
{
}
#if !defined(ARCADIA_BUILD)
class LZMAInflatingReadBuffer : public BufferWithOwnMemory<ReadBuffer>
{
public:
@ -30,4 +30,26 @@ private:
bool eof;
};
#else
namespace ErrorCodes
{
extern const int NOT_IMPLEMENTED;
}
class LZMAInflatingReadBuffer : public BufferWithOwnMemory<ReadBuffer>
{
public:
LZMAInflatingReadBuffer(
std::unique_ptr<ReadBuffer> in_ [[maybe_unused]],
size_t buf_size [[maybe_unused]] = DBMS_DEFAULT_BUFFER_SIZE,
char * existing_memory [[maybe_unused]] = nullptr,
size_t alignment [[maybe_unused]] = 0)
{
throw Exception("LZMADeflatingWriteBuffer is not implemented for arcadia build", ErrorCodes::NOT_IMPLEMENTED);
}
};
#endif
}