OmniSciDB  a987f07e93
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CalciteDeserializerUtils.h File Reference
#include "DateAdd.h"
#include "DateTruncate.h"
#include "../Shared/sqldefs.h"
#include "../Shared/sqltypes.h"
#include "Logger/Logger.h"
+ Include dependency graph for CalciteDeserializerUtils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Analyzer
 

Functions

SQLOps to_sql_op (const std::string &op_str)
 
SQLAgg to_agg_kind (const std::string &agg_name)
 
SQLTypes to_sql_type (const std::string &type_name)
 
SQLTypeInfo get_agg_type (const SQLAgg agg_kind, const Analyzer::Expr *arg_expr)
 
ExtractField to_datepart_field (const std::string &)
 
DateaddField to_dateadd_field (const std::string &)
 
DatetruncField to_datediff_field (const std::string &)
 
std::shared_ptr
< Analyzer::Constant
make_fp_constant (const int64_t val, const SQLTypeInfo &ti)
 

Function Documentation

SQLTypeInfo get_agg_type ( const SQLAgg  agg_kind,
const Analyzer::Expr arg_expr 
)

Definition at line 26 of file CalciteDeserializerUtils.cpp.

References g_bigint_count, Analyzer::Expr::get_type_info(), SQLTypeInfo::get_type_name(), SQLTypeInfo::is_integer(), SQLTypeInfo::is_varlen(), kAPPROX_COUNT_DISTINCT, kAPPROX_QUANTILE, kAVG, kBIGINT, kCOUNT, kCOUNT_IF, kDOUBLE, kINT, kMAX, kMIN, kMODE, kSAMPLE, kSINGLE_VALUE, kSUM, kSUM_IF, and UNREACHABLE.

Referenced by anonymous_namespace{RelAlgExecutor.cpp}::decide_approx_count_distinct_implementation(), and RelAlgTranslator::translateAggregateRex().

26  {
27  switch (agg_kind) {
28  case kCOUNT:
29  case kCOUNT_IF:
30  return SQLTypeInfo(g_bigint_count ? kBIGINT : kINT, false);
31  case kMIN:
32  case kMAX:
33  return arg_expr->get_type_info();
34  case kSUM:
35  case kSUM_IF:
36  return arg_expr->get_type_info().is_integer() ? SQLTypeInfo(kBIGINT, false)
37  : arg_expr->get_type_info();
38  case kAVG:
39  return SQLTypeInfo(kDOUBLE, false);
41  return SQLTypeInfo(kBIGINT, false);
42  case kAPPROX_QUANTILE:
43  return SQLTypeInfo(kDOUBLE, false);
44  case kSINGLE_VALUE:
45  if (arg_expr->get_type_info().is_varlen()) {
46  throw std::runtime_error("SINGLE_VALUE not supported on '" +
47  arg_expr->get_type_info().get_type_name() + "' input.");
48  } // else fall through
49  case kSAMPLE:
50  case kMODE:
51  return arg_expr->get_type_info();
52  default:
53  UNREACHABLE() << "Unsupported agg_kind: " << agg_kind;
54  return {};
55  }
56 }
bool is_varlen() const
Definition: sqltypes.h:616
#define UNREACHABLE()
Definition: Logger.h:333
Definition: sqldefs.h:75
bool is_integer() const
Definition: sqltypes.h:578
bool g_bigint_count
Definition: sqldefs.h:77
const SQLTypeInfo & get_type_info() const
Definition: Analyzer.h:83
Definition: sqldefs.h:78
std::string get_type_name() const
Definition: sqltypes.h:504
Definition: sqltypes.h:60
Definition: sqldefs.h:76
Definition: sqldefs.h:74
Definition: sqldefs.h:83

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::shared_ptr<Analyzer::Constant> make_fp_constant ( const int64_t  val,
const SQLTypeInfo ti 
)

Definition at line 212 of file CalciteDeserializerUtils.cpp.

References CHECK, Datum::doubleval, Datum::floatval, SQLTypeInfo::get_type(), kDOUBLE, and kFLOAT.

Referenced by RelAlgTranslator::translateLiteral().

213  {
214  Datum d;
215  switch (ti.get_type()) {
216  case kFLOAT:
217  d.floatval = val;
218  break;
219  case kDOUBLE:
220  d.doubleval = val;
221  break;
222  default:
223  CHECK(false);
224  }
225  return makeExpr<Analyzer::Constant>(ti, false, d);
226 }
HOST DEVICE SQLTypes get_type() const
Definition: sqltypes.h:380
float floatval
Definition: Datum.h:73
#define CHECK(condition)
Definition: Logger.h:289
Definition: Datum.h:67
double doubleval
Definition: Datum.h:74

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

SQLAgg to_agg_kind ( const std::string &  agg_name)
inline

Definition at line 97 of file CalciteDeserializerUtils.h.

References kAPPROX_COUNT_DISTINCT, kAPPROX_QUANTILE, kAVG, kCOUNT, kCOUNT_IF, kMAX, kMIN, kMODE, kSAMPLE, kSINGLE_VALUE, kSUM, and kSUM_IF.

Referenced by anonymous_namespace{RelAlgDag.cpp}::parse_aggregate_expr().

97  {
98  if (agg_name == std::string("COUNT")) {
99  return kCOUNT;
100  }
101  if (agg_name == std::string("MIN")) {
102  return kMIN;
103  }
104  if (agg_name == std::string("MAX")) {
105  return kMAX;
106  }
107  if (agg_name == std::string("SUM")) {
108  return kSUM;
109  }
110  if (agg_name == std::string("AVG")) {
111  return kAVG;
112  }
113  if (agg_name == std::string("APPROX_COUNT_DISTINCT")) {
114  return kAPPROX_COUNT_DISTINCT;
115  }
116  if (agg_name == "APPROX_MEDIAN" || agg_name == "APPROX_PERCENTILE" ||
117  agg_name == "APPROX_QUANTILE") {
118  return kAPPROX_QUANTILE;
119  }
120  if (agg_name == std::string("ANY_VALUE") || agg_name == std::string("SAMPLE") ||
121  agg_name == std::string("LAST_SAMPLE")) {
122  return kSAMPLE;
123  }
124  if (agg_name == std::string("SINGLE_VALUE")) {
125  return kSINGLE_VALUE;
126  }
127  if (agg_name == "MODE") {
128  return kMODE;
129  }
130  if (agg_name == "COUNT_IF") {
131  return kCOUNT_IF;
132  }
133  if (agg_name == "SUM_IF") {
134  return kSUM_IF;
135  }
136  throw std::runtime_error("Aggregate function " + agg_name + " not supported");
137 }
Definition: sqldefs.h:75
Definition: sqldefs.h:77
Definition: sqldefs.h:78
Definition: sqldefs.h:76
Definition: sqldefs.h:74
Definition: sqldefs.h:83

+ Here is the caller graph for this function:

DateaddField to_dateadd_field ( const std::string &  )

Definition at line 110 of file CalciteDeserializerUtils.cpp.

References daCENTURY, daDAY, daDECADE, daHOUR, daMICROSECOND, daMILLENNIUM, daMILLISECOND, daMINUTE, daMONTH, daNANOSECOND, daQUARTER, daSECOND, daWEEK, daWEEKDAY, and daYEAR.

Referenced by RelAlgTranslator::translateDateadd(), and RelAlgTranslator::translateIntervalExprForWindowFraming().

110  {
111  DateaddField fieldno;
112  if (boost::iequals(field, "year") || boost::iequals(field, "yy") ||
113  boost::iequals(field, "yyyy") || boost::iequals(field, "sql_tsi_year")) {
114  fieldno = daYEAR;
115  } else if (boost::iequals(field, "quarter") || boost::iequals(field, "qq") ||
116  boost::iequals(field, "q") || boost::iequals(field, "sql_tsi_quarter")) {
117  fieldno = daQUARTER;
118  } else if (boost::iequals(field, "month") || boost::iequals(field, "mm") ||
119  boost::iequals(field, "m") || boost::iequals(field, "sql_tsi_month")) {
120  fieldno = daMONTH;
121  } else if (boost::iequals(field, "day") || boost::iequals(field, "dd") ||
122  boost::iequals(field, "d") || boost::iequals(field, "sql_tsi_day")) {
123  fieldno = daDAY;
124  } else if (boost::iequals(field, "week") || boost::iequals(field, "ww") ||
125  boost::iequals(field, "w") || boost::iequals(field, "sql_tsi_week")) {
126  fieldno = daWEEK;
127  } else if (boost::iequals(field, "hour") || boost::iequals(field, "hh") ||
128  boost::iequals(field, "sql_tsi_hour")) {
129  fieldno = daHOUR;
130  } else if (boost::iequals(field, "minute") || boost::iequals(field, "mi") ||
131  boost::iequals(field, "n") || boost::iequals(field, "sql_tsi_minute")) {
132  fieldno = daMINUTE;
133  } else if (boost::iequals(field, "second") || boost::iequals(field, "ss") ||
134  boost::iequals(field, "s") || boost::iequals(field, "sql_tsi_second")) {
135  fieldno = daSECOND;
136  } else if (boost::iequals(field, "millisecond") || boost::iequals(field, "ms")) {
137  fieldno = daMILLISECOND;
138  } else if (boost::iequals(field, "microsecond") || boost::iequals(field, "us") ||
139  boost::iequals(field, "sql_tsi_microsecond") ||
140  boost::iequals(field, "frac_second")) {
141  fieldno = daMICROSECOND;
142  } else if (boost::iequals(field, "nanosecond") || boost::iequals(field, "ns") ||
143  boost::iequals(field, "sql_tsi_frac_second")) {
144  fieldno = daNANOSECOND;
145  } else if (boost::iequals(field, "weekday") || boost::iequals(field, "dw")) {
146  fieldno = daWEEKDAY;
147  } else if (boost::iequals(field, "decade") || boost::iequals(field, "dc")) {
148  fieldno = daDECADE;
149  } else if (boost::iequals(field, "century")) {
150  fieldno = daCENTURY;
151  } else if (boost::iequals(field, "millennium")) {
152  fieldno = daMILLENNIUM;
153  } else {
154  throw std::runtime_error("Unsupported field in DATEADD function: " + field);
155  }
156  return fieldno;
157 }
Definition: DateAdd.h:47
const rapidjson::Value & field(const rapidjson::Value &obj, const char field[]) noexcept
Definition: JsonAccessors.h:31
Definition: DateAdd.h:43
DateaddField
Definition: DateAdd.h:42
Definition: DateAdd.h:56
Definition: DateAdd.h:46

+ Here is the caller graph for this function:

DatetruncField to_datediff_field ( const std::string &  )

Definition at line 159 of file CalciteDeserializerUtils.cpp.

References dtCENTURY, dtDAY, dtDECADE, dtHOUR, dtMICROSECOND, dtMILLENNIUM, dtMILLISECOND, dtMINUTE, dtMONTH, dtNANOSECOND, dtQUARTER, dtQUARTERDAY, dtSECOND, dtWEEK, dtWEEK_SATURDAY, dtWEEK_SUNDAY, and dtYEAR.

Referenced by RelAlgTranslator::translateDatediff().

159  {
160  DatetruncField fieldno;
161  if (boost::iequals(field, "year") || boost::iequals(field, "yy") ||
162  boost::iequals(field, "yyyy") || boost::iequals(field, "sql_tsi_year")) {
163  fieldno = dtYEAR;
164  } else if (boost::iequals(field, "quarter") || boost::iequals(field, "qq") ||
165  boost::iequals(field, "q") || boost::iequals(field, "sql_tsi_quarter")) {
166  fieldno = dtQUARTER;
167  } else if (boost::iequals(field, "month") || boost::iequals(field, "mm") ||
168  boost::iequals(field, "m") || boost::iequals(field, "sql_tsi_month")) {
169  fieldno = dtMONTH;
170  } else if (boost::iequals(field, "week") || boost::iequals(field, "ww") ||
171  boost::iequals(field, "w") || boost::iequals(field, "sql_tsi_week")) {
172  fieldno = dtWEEK;
173  } else if (boost::iequals(field, "week_sunday")) {
174  fieldno = dtWEEK_SUNDAY;
175  } else if (boost::iequals(field, "week_saturday")) {
176  fieldno = dtWEEK_SATURDAY;
177  } else if (boost::iequals(field, "day") || boost::iequals(field, "dd") ||
178  boost::iequals(field, "d") || boost::iequals(field, "sql_tsi_day")) {
179  fieldno = dtDAY;
180  } else if (boost::iequals(field, "quarterday")) {
181  fieldno = dtQUARTERDAY;
182  } else if (boost::iequals(field, "hour") || boost::iequals(field, "hh") ||
183  boost::iequals(field, "sql_tsi_hour")) {
184  fieldno = dtHOUR;
185  } else if (boost::iequals(field, "minute") || boost::iequals(field, "mi") ||
186  boost::iequals(field, "n") || boost::iequals(field, "sql_tsi_minute")) {
187  fieldno = dtMINUTE;
188  } else if (boost::iequals(field, "second") || boost::iequals(field, "ss") ||
189  boost::iequals(field, "s") || boost::iequals(field, "sql_tsi_second")) {
190  fieldno = dtSECOND;
191  } else if (boost::iequals(field, "millisecond") || boost::iequals(field, "ms")) {
192  fieldno = dtMILLISECOND;
193  } else if (boost::iequals(field, "microsecond") || boost::iequals(field, "us") ||
194  boost::iequals(field, "sql_tsi_microsecond") ||
195  boost::iequals(field, "frac_second")) {
196  fieldno = dtMICROSECOND;
197  } else if (boost::iequals(field, "nanosecond") || boost::iequals(field, "ns") ||
198  boost::iequals(field, "sql_tsi_frac_second")) {
199  fieldno = dtNANOSECOND;
200  } else if (boost::iequals(field, "decade") || boost::iequals(field, "dc")) {
201  fieldno = dtDECADE;
202  } else if (boost::iequals(field, "century")) {
203  fieldno = dtCENTURY;
204  } else if (boost::iequals(field, "millennium")) {
205  fieldno = dtMILLENNIUM;
206  } else {
207  throw std::runtime_error("Unsupported field in DATEDIFF function: " + field);
208  }
209  return fieldno;
210 }
const rapidjson::Value & field(const rapidjson::Value &obj, const char field[]) noexcept
Definition: JsonAccessors.h:31
DatetruncField
Definition: DateTruncate.h:27

+ Here is the caller graph for this function:

ExtractField to_datepart_field ( const std::string &  )

Definition at line 58 of file CalciteDeserializerUtils.cpp.

References kDAY, kDOY, kHOUR, kISODOW, kMICROSECOND, kMILLISECOND, kMINUTE, kMONTH, kNANOSECOND, kQUARTER, kQUARTERDAY, kSECOND, kWEEK, kWEEK_SATURDAY, kWEEK_SUNDAY, and kYEAR.

Referenced by RelAlgTranslator::translateDatepart().

58  {
59  ExtractField fieldno;
60  if (boost::iequals(field, "year") || boost::iequals(field, "yy") ||
61  boost::iequals(field, "yyyy") || boost::iequals(field, "sql_tsi_year")) {
62  fieldno = kYEAR;
63  } else if (boost::iequals(field, "quarter") || boost::iequals(field, "qq") ||
64  boost::iequals(field, "q") || boost::iequals(field, "sql_tsi_quarter")) {
65  fieldno = kQUARTER;
66  } else if (boost::iequals(field, "month") || boost::iequals(field, "mm") ||
67  boost::iequals(field, "m") || boost::iequals(field, "sql_tsi_month")) {
68  fieldno = kMONTH;
69  } else if (boost::iequals(field, "dayofyear") || boost::iequals(field, "dy") ||
70  boost::iequals(field, "y")) {
71  fieldno = kDOY;
72  } else if (boost::iequals(field, "day") || boost::iequals(field, "dd") ||
73  boost::iequals(field, "d") || boost::iequals(field, "sql_tsi_day")) {
74  fieldno = kDAY;
75  } else if (boost::iequals(field, "week") || boost::iequals(field, "ww") ||
76  boost::iequals(field, "w") || boost::iequals(field, "sql_tsi_week")) {
77  fieldno = kWEEK;
78  } else if (boost::iequals(field, "week_sunday")) {
79  fieldno = kWEEK_SUNDAY;
80  } else if (boost::iequals(field, "week_saturday")) {
81  fieldno = kWEEK_SATURDAY;
82  } else if (boost::iequals(field, "hour") || boost::iequals(field, "hh") ||
83  boost::iequals(field, "sql_tsi_hour")) {
84  fieldno = kHOUR;
85  } else if (boost::iequals(field, "minute") || boost::iequals(field, "mi") ||
86  boost::iequals(field, "n") || boost::iequals(field, "sql_tsi_minute")) {
87  fieldno = kMINUTE;
88  } else if (boost::iequals(field, "second") || boost::iequals(field, "ss") ||
89  boost::iequals(field, "s") || boost::iequals(field, "sql_tsi_second")) {
90  fieldno = kSECOND;
91  } else if (boost::iequals(field, "millisecond") || boost::iequals(field, "ms")) {
92  fieldno = kMILLISECOND;
93  } else if (boost::iequals(field, "microsecond") || boost::iequals(field, "us") ||
94  boost::iequals(field, "sql_tsi_microsecond") ||
95  boost::iequals(field, "frac_second")) {
96  fieldno = kMICROSECOND;
97  } else if (boost::iequals(field, "nanosecond") || boost::iequals(field, "ns") ||
98  boost::iequals(field, "sql_tsi_frac_second")) {
99  fieldno = kNANOSECOND;
100  } else if (boost::iequals(field, "weekday") || boost::iequals(field, "dw")) {
101  fieldno = kISODOW;
102  } else if (boost::iequals(field, "quarterday") || boost::iequals(field, "dq")) {
103  fieldno = kQUARTERDAY;
104  } else {
105  throw std::runtime_error("Unsupported field in DATEPART function: " + field);
106  }
107  return fieldno;
108 }
const rapidjson::Value & field(const rapidjson::Value &obj, const char field[]) noexcept
Definition: JsonAccessors.h:31
ExtractField

+ Here is the caller graph for this function:

SQLOps to_sql_op ( const std::string &  op_str)
inline

Definition at line 27 of file CalciteDeserializerUtils.h.

References kAND, kBW_EQ, kCAST, kDIVIDE, kENCODE_TEXT, kEQ, kFUNCTION, kGE, kGT, kIN, kISNOTNULL, kISNULL, kLE, kLT, kMINUS, kMODULO, kMULTIPLY, kNE, kNOT, kOR, kPLUS, and kUNNEST.

Referenced by anonymous_namespace{RelAlgDag.cpp}::parse_operator().

27  {
28  if (op_str == std::string(">")) {
29  return kGT;
30  }
31  if (op_str == std::string("IS NOT DISTINCT FROM")) {
32  return kBW_EQ;
33  }
34  if (op_str == std::string(">=")) {
35  return kGE;
36  }
37  if (op_str == std::string("<")) {
38  return kLT;
39  }
40  if (op_str == std::string("<=")) {
41  return kLE;
42  }
43  if (op_str == std::string("=")) {
44  return kEQ;
45  }
46  if (op_str == std::string("<>")) {
47  return kNE;
48  }
49  if (op_str == std::string("+")) {
50  return kPLUS;
51  }
52  if (op_str == std::string("-")) {
53  return kMINUS;
54  }
55  if (op_str == std::string("*")) {
56  return kMULTIPLY;
57  }
58  if (op_str == std::string("/")) {
59  return kDIVIDE;
60  }
61  if (op_str == "MOD") {
62  return kMODULO;
63  }
64  if (op_str == std::string("AND")) {
65  return kAND;
66  }
67  if (op_str == std::string("OR")) {
68  return kOR;
69  }
70  if (op_str == std::string("CAST")) {
71  return kCAST;
72  }
73  if (op_str == std::string("ENCODE_TEXT")) {
74  return kENCODE_TEXT;
75  }
76  if (op_str == std::string("NOT")) {
77  return kNOT;
78  }
79  if (op_str == std::string("IS NULL")) {
80  return kISNULL;
81  }
82  if (op_str == std::string("IS NOT NULL")) {
83  return kISNOTNULL;
84  }
85  if (op_str == std::string("PG_UNNEST")) {
86  return kUNNEST;
87  }
88  if (op_str == std::string("PG_ANY") || op_str == std::string("PG_ALL")) {
89  throw std::runtime_error("Invalid use of " + op_str + " operator");
90  }
91  if (op_str == std::string("IN")) {
92  return kIN;
93  }
94  return kFUNCTION;
95 }
Definition: sqldefs.h:34
Definition: sqldefs.h:35
Definition: sqldefs.h:37
Definition: sqldefs.h:48
Definition: sqldefs.h:29
Definition: sqldefs.h:40
Definition: sqldefs.h:36
Definition: sqldefs.h:33
Definition: sqldefs.h:39
Definition: sqldefs.h:31
Definition: sqldefs.h:52
Definition: sqldefs.h:30
Definition: sqldefs.h:32
Definition: sqldefs.h:38

+ Here is the caller graph for this function:

SQLTypes to_sql_type ( const std::string &  type_name)
inline

Definition at line 139 of file CalciteDeserializerUtils.h.

References kARRAY, kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kDOUBLE, kEVAL_CONTEXT_TYPE, kFLOAT, kGEOGRAPHY, kGEOMETRY, kINT, kINTERVAL_DAY_TIME, kINTERVAL_YEAR_MONTH, kLINESTRING, kMULTILINESTRING, kMULTIPOINT, kMULTIPOLYGON, kNULLT, kPOINT, kPOLYGON, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, and kTINYINT.

Referenced by Parser::anonymous_namespace{ParserNode.cpp}::column_from_json(), anonymous_namespace{RelAlgDag.cpp}::parse_literal(), and anonymous_namespace{RelAlgDag.cpp}::parse_type().

139  {
140  if (type_name == std::string("BIGINT")) {
141  return kBIGINT;
142  }
143  if (type_name == std::string("INTEGER")) {
144  return kINT;
145  }
146  if (type_name == std::string("TINYINT")) {
147  return kTINYINT;
148  }
149  if (type_name == std::string("SMALLINT")) {
150  return kSMALLINT;
151  }
152  if (type_name == std::string("FLOAT")) {
153  return kFLOAT;
154  }
155  if (type_name == std::string("REAL")) {
156  return kFLOAT;
157  }
158  if (type_name == std::string("DOUBLE")) {
159  return kDOUBLE;
160  }
161  if (type_name == std::string("DECIMAL")) {
162  return kDECIMAL;
163  }
164  if (type_name == std::string("CHAR") || type_name == std::string("VARCHAR") ||
165  type_name == std::string("SYMBOL")) {
166  return kTEXT;
167  }
168  if (type_name == std::string("BOOLEAN")) {
169  return kBOOLEAN;
170  }
171  if (type_name == std::string("TIMESTAMP")) {
172  return kTIMESTAMP;
173  }
174  if (type_name == std::string("DATE")) {
175  return kDATE;
176  }
177  if (type_name == std::string("TIME")) {
178  return kTIME;
179  }
180  if (type_name == std::string("NULL")) {
181  return kNULLT;
182  }
183  if (type_name == std::string("ARRAY")) {
184  return kARRAY;
185  }
186  if (type_name == std::string("INTERVAL_DAY") ||
187  type_name == std::string("INTERVAL_HOUR") ||
188  type_name == std::string("INTERVAL_MINUTE") ||
189  type_name == std::string("INTERVAL_SECOND")) {
190  return kINTERVAL_DAY_TIME;
191  }
192  if (type_name == std::string("INTERVAL_MONTH") ||
193  type_name == std::string("INTERVAL_YEAR")) {
194  return kINTERVAL_YEAR_MONTH;
195  }
196  if (type_name == std::string("ANY")) {
197  return kEVAL_CONTEXT_TYPE;
198  }
199  if (type_name == std::string("TEXT")) {
200  return kTEXT;
201  }
202  if (type_name == std::string("POINT")) {
203  return kPOINT;
204  }
205  if (type_name == std::string("MULTIPOINT")) {
206  return kMULTIPOINT;
207  }
208  if (type_name == std::string("LINESTRING")) {
209  return kLINESTRING;
210  }
211  if (type_name == std::string("MULTILINESTRING")) {
212  return kMULTILINESTRING;
213  }
214  if (type_name == std::string("POLYGON")) {
215  return kPOLYGON;
216  }
217  if (type_name == std::string("MULTIPOLYGON")) {
218  return kMULTIPOLYGON;
219  }
220  if (type_name == std::string("GEOMETRY")) {
221  return kGEOMETRY;
222  }
223  if (type_name == std::string("GEOGRAPHY")) {
224  return kGEOGRAPHY;
225  }
226 
227  throw std::runtime_error("Unsupported type: " + type_name);
228 }
Definition: sqltypes.h:64
Definition: sqltypes.h:67
Definition: sqltypes.h:68
Definition: sqltypes.h:60
constexpr auto type_name() noexcept

+ Here is the caller graph for this function: