ClickHouse/dbms/src/Storages/SelectQueryInfo.h

34 lines
678 B
C++
Raw Normal View History

2017-07-15 04:06:51 +00:00
#pragma once
#include <memory>
2017-07-24 12:58:01 +00:00
#include <unordered_map>
#include <Parsers/StringRange.h>
2017-07-15 04:06:51 +00:00
namespace DB
{
class IAST;
using ASTPtr = std::shared_ptr<IAST>;
class Set;
using SetPtr = std::shared_ptr<Set>;
/// Information about calculated sets in right hand side of IN.
using PreparedSets = std::unordered_map<StringRange, SetPtr, StringRangePointersHash, StringRangePointersEqualTo>;
2017-07-15 04:06:51 +00:00
/** Query along with some additional data,
* that can be used during query processing
* inside storage engines.
*/
struct SelectQueryInfo
{
ASTPtr query;
/// Prepared sets are used for indices by storage engine.
/// Example: x IN (1, 2, 3)
PreparedSets sets;
};
}