1#pragma once
2
3#include <Core/Types.h>
4
5
6namespace DB
7{
8
9/// Up to what stage the SELECT query is executed or needs to be executed.
10namespace QueryProcessingStage
11{
12 /// Numbers matter - the later stage has a larger number.
13 enum Enum
14 {
15 FetchColumns = 0, /// Only read/have been read the columns specified in the query.
16 WithMergeableState = 1, /// Until the stage where the results of processing on different servers can be combined.
17 Complete = 2, /// Completely.
18 };
19
20 inline const char * toString(UInt64 stage)
21 {
22 static const char * data[] = { "FetchColumns", "WithMergeableState", "Complete" };
23 return stage < 3
24 ? data[stage]
25 : "Unknown stage";
26 }
27}
28
29}
30