From ca883a699d83c15b87cf06ce4a981b28759cbc90 Mon Sep 17 00:00:00 2001 From: alexey-milovidov Date: Wed, 13 Jun 2018 21:54:32 +0300 Subject: [PATCH] Update StorageURL.cpp --- dbms/src/Storages/StorageURL.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dbms/src/Storages/StorageURL.cpp b/dbms/src/Storages/StorageURL.cpp index a88d8d9e6d0..9c5a6031b50 100644 --- a/dbms/src/Storages/StorageURL.cpp +++ b/dbms/src/Storages/StorageURL.cpp @@ -52,8 +52,6 @@ namespace reader = FormatFactory::instance().getInput(format, *read_buf, sample_block, context, max_block_size); } - ~StorageURLBlockInputStream() override {} - String getName() const override { return name; @@ -97,8 +95,6 @@ namespace { } - ~StorageURLBlockOutputStream() {} - Block getHeader() const override { return sample_block; @@ -106,7 +102,8 @@ namespace void write(const Block & block) override { - ReadWriteBufferFromHTTP::OutStreamCallback out_stream_callback = [&](std::ostream & ostr) { + ReadWriteBufferFromHTTP::OutStreamCallback out_stream_callback = [&](std::ostream & ostr) + { WriteBufferFromOStream out_buffer(ostr); auto writer = FormatFactory::instance().getOutput(format, out_buffer, sample_block, global_context); writer->writePrefix(); @@ -132,7 +129,8 @@ BlockInputStreams StorageURL::read(const Names & /*column_names*/, size_t max_block_size, unsigned /*num_streams*/) { - return {std::make_shared(uri, + return {std::make_shared( + uri, format_name, getName(), getSampleBlock(), @@ -148,9 +146,11 @@ BlockOutputStreamPtr StorageURL::write(const ASTPtr & /*query*/, const Settings return std::make_shared( uri, format_name, getSampleBlock(), context_global, ConnectionTimeouts::getHTTPTimeouts(context_global.getSettingsRef())); } + void registerStorageURL(StorageFactory & factory) { - factory.registerStorage("URL", [](const StorageFactory::Arguments & args) { + factory.registerStorage("URL", [](const StorageFactory::Arguments & args) + { ASTs & engine_args = args.engine_args; if (!(engine_args.size() == 1 || engine_args.size() == 2))