OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sql_window_function_to_string.h File Reference
#include "sqldefs.h"
#include <string>
#include "Logger.h"
+ Include dependency graph for sql_window_function_to_string.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

std::string sql_window_function_to_str (const SqlWindowFunctionKind kind)
 

Function Documentation

std::string sql_window_function_to_str ( const SqlWindowFunctionKind  kind)
inline

Definition at line 24 of file sql_window_function_to_string.h.

References AVG, COUNT, CUME_DIST, DENSE_RANK, logger::FATAL, FIRST_VALUE, LAG, LAST_VALUE, LEAD, LOG, MAX, MIN, NTILE, PERCENT_RANK, RANK, ROW_NUMBER, SUM, and SUM_INTERNAL.

Referenced by WindowFunctionContext::computePartition(), and Analyzer::WindowFunction::toString().

24  {
25  switch (kind) {
27  return "ROW_NUMBER";
28  }
30  return "RANK";
31  }
33  return "DENSE_RANK";
34  }
36  return "PERCENT_RANK";
37  }
39  return "CUME_DIST";
40  }
42  return "NTILE";
43  }
45  return "LAG";
46  }
48  return "LEAD";
49  }
51  return "FIRST_VALUE";
52  }
54  return "LAST_VALUE";
55  }
57  return "AVG";
58  }
60  return "MIN";
61  }
63  return "MAX";
64  }
66  return "SUM";
67  }
69  return "COUNT";
70  }
72  return "SUM_INTERNAL";
73  }
74  default: {
75  LOG(FATAL) << "Invalid window function kind";
76  return "";
77  }
78  }
79 }
#define LOG(tag)
Definition: Logger.h:185

+ Here is the caller graph for this function: