mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
dbms: development [#CONV-2944].
This commit is contained in:
parent
b644b610bb
commit
624b31602c
@ -1,5 +1,4 @@
|
||||
#ifndef DBMS_PARSERS_PARSERSELECTQUERY_H
|
||||
#define DBMS_PARSERS_PARSERSELECTQUERY_H
|
||||
#pragma once
|
||||
|
||||
#include <DB/Parsers/ASTSelectQuery.h>
|
||||
#include <DB/Parsers/IParserBase.h>
|
||||
@ -23,7 +22,7 @@ protected:
|
||||
ASTPtr select_expression_list;
|
||||
|
||||
ParserWhiteSpaceOrComments ws;
|
||||
ParserString s("SELECT", true);
|
||||
ParserString s("SELECT", true, true);
|
||||
ParserNotEmptyExpressionList exp_list;
|
||||
|
||||
ws.ignore(pos, end);
|
||||
@ -46,5 +45,3 @@ protected:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -1,22 +1,20 @@
|
||||
#ifndef DBMS_STORAGES_ISTORAGE_H
|
||||
#define DBMS_STORAGES_ISTORAGE_H
|
||||
|
||||
//#include <boost/property_tree/ptree.hpp>
|
||||
#pragma once
|
||||
|
||||
#include <Poco/SharedPtr.h>
|
||||
|
||||
#include <DB/Core/Defines.h>
|
||||
#include <DB/Core/Names.h>
|
||||
#include <DB/Core/Exception.h>
|
||||
|
||||
#include <DB/DataStreams/IBlockInputStream.h>
|
||||
#include <DB/DataStreams/IBlockOutputStream.h>
|
||||
|
||||
#include <DB/Parsers/IAST.h>
|
||||
|
||||
|
||||
namespace DB
|
||||
{
|
||||
|
||||
typedef char ptree; /// временная заглушка, вместо boost::property_tree::ptree
|
||||
//using boost::property_tree::ptree;
|
||||
using Poco::SharedPtr;
|
||||
|
||||
/** Хранилище. Отвечает за:
|
||||
@ -40,7 +38,7 @@ public:
|
||||
*/
|
||||
virtual SharedPtr<IBlockInputStream> read(
|
||||
const Names & column_names,
|
||||
const ptree & query,
|
||||
ASTPtr query,
|
||||
size_t max_block_size = DEFAULT_BLOCK_SIZE)
|
||||
{
|
||||
throw Exception("Method read() is not supported by storage " + getName());
|
||||
@ -51,7 +49,7 @@ public:
|
||||
* Возвращает объект, с помощью которого можно последовательно писать данные.
|
||||
*/
|
||||
virtual SharedPtr<IBlockOutputStream> write(
|
||||
const ptree & query)
|
||||
ASTPtr query)
|
||||
{
|
||||
throw Exception("Method write() is not supported by storage " + getName());
|
||||
}
|
||||
@ -59,6 +57,6 @@ public:
|
||||
virtual ~IStorage() {}
|
||||
};
|
||||
|
||||
}
|
||||
typedef SharedPtr<IStorage> StoragePtr;
|
||||
|
||||
#endif
|
||||
}
|
||||
|
@ -90,11 +90,11 @@ public:
|
||||
|
||||
SharedPtr<IBlockInputStream> read(
|
||||
const Names & column_names,
|
||||
const ptree & query,
|
||||
ASTPtr query,
|
||||
size_t max_block_size = DEFAULT_BLOCK_SIZE);
|
||||
|
||||
SharedPtr<IBlockOutputStream> write(
|
||||
const ptree & query);
|
||||
ASTPtr query);
|
||||
|
||||
private:
|
||||
const std::string path;
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
|
||||
SharedPtr<IBlockInputStream> read(
|
||||
const Names & column_names,
|
||||
const ptree & query,
|
||||
ASTPtr query,
|
||||
size_t max_block_size = DEFAULT_BLOCK_SIZE);
|
||||
};
|
||||
|
||||
|
@ -94,7 +94,7 @@ StorageLog::StorageLog(const std::string & path_, const std::string & name_, Sha
|
||||
|
||||
SharedPtr<IBlockInputStream> StorageLog::read(
|
||||
const Names & column_names,
|
||||
const ptree & query,
|
||||
ASTPtr query,
|
||||
size_t max_block_size)
|
||||
{
|
||||
return new LogBlockInputStream(max_block_size, column_names, *this);
|
||||
@ -102,7 +102,7 @@ SharedPtr<IBlockInputStream> StorageLog::read(
|
||||
|
||||
|
||||
SharedPtr<IBlockOutputStream> StorageLog::write(
|
||||
const ptree & query)
|
||||
ASTPtr query)
|
||||
{
|
||||
return new LogBlockOutputStream(*this);
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ Block NumbersBlockInputStream::read()
|
||||
|
||||
|
||||
SharedPtr<IBlockInputStream> StorageSystemNumbers::read(
|
||||
const Names & column_names, const ptree & query, size_t max_block_size)
|
||||
const Names & column_names, ASTPtr query, size_t max_block_size)
|
||||
{
|
||||
if (column_names.size() != 1)
|
||||
throw Exception("Incorrect number of columns.", ErrorCodes::INCORRECT_NUMBER_OF_COLUMNS);
|
||||
|
Loading…
Reference in New Issue
Block a user