mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-24 18:50:49 +00:00
Processors support for StorageMySQL reading.
This commit is contained in:
parent
dd888f59a7
commit
cef9db809f
@ -15,6 +15,8 @@
|
||||
#include <IO/WriteHelpers.h>
|
||||
#include <Parsers/ASTLiteral.h>
|
||||
#include <mysqlxx/Transaction.h>
|
||||
#include <Processors/Sources/SourceFromInputStream.h>
|
||||
#include <Processors/Pipe.h>
|
||||
|
||||
|
||||
namespace DB
|
||||
@ -59,7 +61,7 @@ StorageMySQL::StorageMySQL(
|
||||
}
|
||||
|
||||
|
||||
BlockInputStreams StorageMySQL::read(
|
||||
Pipes StorageMySQL::readWithProcessors(
|
||||
const Names & column_names_,
|
||||
const SelectQueryInfo & query_info_,
|
||||
const Context & context_,
|
||||
@ -78,7 +80,12 @@ BlockInputStreams StorageMySQL::read(
|
||||
sample_block.insert({ column_data.type, column_data.name });
|
||||
}
|
||||
|
||||
return { std::make_shared<MySQLBlockInputStream>(pool.Get(), query, sample_block, max_block_size_) };
|
||||
Pipes pipes;
|
||||
/// TODO: rewrite MySQLBlockInputStream
|
||||
pipes.emplace_back(std::make_shared<SourceFromInputStream>(
|
||||
std::make_shared<MySQLBlockInputStream>(pool.Get(), query, sample_block, max_block_size_)));
|
||||
|
||||
return pipes;
|
||||
}
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@ public:
|
||||
|
||||
std::string getName() const override { return "MySQL"; }
|
||||
|
||||
BlockInputStreams read(
|
||||
Pipes readWithProcessors(
|
||||
const Names & column_names,
|
||||
const SelectQueryInfo & query_info,
|
||||
const Context & context,
|
||||
|
Loading…
Reference in New Issue
Block a user