ClickHouse/dbms/Core/QueryProcessingStage.h

30 lines
767 B
C++
Raw Normal View History

2012-05-09 13:12:38 +00:00
#pragma once
#include <Core/Types.h>
2012-05-09 13:12:38 +00:00
namespace DB
{
2017-04-30 13:50:16 +00:00
/// Up to what stage the SELECT query is executed or needs to be executed.
2012-05-09 13:12:38 +00:00
namespace QueryProcessingStage
{
2017-04-30 13:50:16 +00:00
/// Numbers matter - the later stage has a larger number.
enum Enum
{
2018-11-26 00:56:50 +00:00
FetchColumns = 0, /// Only read/have been read the columns specified in the query.
WithMergeableState = 1, /// Until the stage where the results of processing on different servers can be combined.
Complete = 2, /// Completely.
};
2012-05-23 19:51:30 +00:00
inline const char * toString(UInt64 stage)
{
static const char * data[] = { "FetchColumns", "WithMergeableState", "Complete" };
return stage < 3
? data[stage]
: "Unknown stage";
}
2012-05-09 13:12:38 +00:00
}
}