fix -DENABLE_EXAMPLES=1 in master

This commit is contained in:
Constantine Peresypkin 2022-07-23 19:00:52 +02:00
parent 77ddb8eda0
commit d645d03e89
4 changed files with 6 additions and 18 deletions

View File

@ -99,6 +99,7 @@ try
std::cout << "list\n";
zk.list("/",
Coordination::ListRequestType::ALL,
[&](const ListResponse & response)
{
if (response.error != Coordination::Error::ZOK)

View File

@ -1,5 +1,4 @@
#include <iostream>
#include <iomanip>
#include <Interpreters/AggregationCommon.h>
@ -33,22 +32,6 @@ int main(int, char **)
std::cerr << "dump: " << wb.str() << std::endl;
}
{
using Cont = SmallMap<int, std::string, 16>;
Cont cont;
cont.insert(Cont::value_type(1, "Hello, world!"));
cont[1] = "Goodbye.";
for (auto x : cont)
std::cerr << x.getKey() << " -> " << x.getMapped() << std::endl;
DB::WriteBufferFromOwnString wb;
cont.writeText(wb);
std::cerr << "dump: " << wb.str() << std::endl;
}
{
using Cont = SmallSet<DB::UInt128, 16>;
Cont cont;

View File

@ -30,11 +30,14 @@ struct CompactStringRef
union
{
const char * data_mixed = nullptr;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnested-anon-types"
struct
{
char dummy[6];
UInt16 size;
};
#pragma clang diagnostic pop
};
CompactStringRef(const char * data_, size_t size_)

View File

@ -23,7 +23,8 @@ int main()
String hdfs_namenode_url = "hdfs://namenode:port/";
String path = "/path/to/hdfs/file";
auto in = std::make_unique<ReadBufferFromHDFS>(hdfs_namenode_url, path, *config);
ReadSettings settings = {};
auto in = std::make_unique<ReadBufferFromHDFS>(hdfs_namenode_url, path, *config, settings);
auto reader = IObjectStorage::getThreadPoolReader();
AsynchronousReadBufferFromHDFS buf(reader, {}, std::move(in));