2012-05-09 13:12:38 +00:00
|
|
|
#pragma once
|
|
|
|
|
2017-04-01 09:19:00 +00:00
|
|
|
#include <Core/Types.h>
|
2013-08-04 01:10:14 +00:00
|
|
|
|
|
|
|
|
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.
|
2017-04-01 07:20:54 +00:00
|
|
|
enum Enum
|
|
|
|
{
|
2017-04-30 13:50:16 +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.
|
2017-04-01 07:20:54 +00:00
|
|
|
};
|
2012-05-23 19:51:30 +00:00
|
|
|
|
2017-04-01 07:20:54 +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
|
|
|
}
|
|
|
|
|
|
|
|
}
|