OmniSciDB  a5dc49c757
 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  return SQLTypeInfo(g_bigint_count ? kBIGINT : kINT, true);
30  case kCOUNT_IF:
31  return SQLTypeInfo(g_bigint_count ? kBIGINT : kINT, false);
32  case kMIN:
33  case kMAX:
34  return arg_expr->get_type_info();
35  case kSUM:
36  case kSUM_IF:
37  return arg_expr->get_type_info().is_integer() ? SQLTypeInfo(kBIGINT, false)
38  : arg_expr->get_type_info();
39  case kAVG:
40  return SQLTypeInfo(kDOUBLE, false);
42  return SQLTypeInfo(kBIGINT, true);
43  case kAPPROX_QUANTILE:
44  return SQLTypeInfo(kDOUBLE, false);
45  case kSINGLE_VALUE:
46  if (arg_expr->get_type_info().is_varlen()) {
47  throw std::runtime_error("SINGLE_VALUE not supported on '" +
48  arg_expr->get_type_info().get_type_name() + "' input.");
49  } // else fall through
50  case kSAMPLE:
51  case kMODE:
52  return arg_expr->get_type_info();
53  default:
54  UNREACHABLE() << "Unsupported agg_kind: " << agg_kind;
55  return {};
56  }
57 }
bool is_varlen() const
Definition: sqltypes.h:631
#define UNREACHABLE()
Definition: Logger.h:338
Definition: sqldefs.h:78
bool is_integer() const
Definition: sqltypes.h:567
bool g_bigint_count
Definition: sqldefs.h:80
const SQLTypeInfo & get_type_info() const
Definition: Analyzer.h:79
Definition: sqldefs.h:81
std::string get_type_name() const
Definition: sqltypes.h:484
Definition: sqltypes.h:72
Definition: sqldefs.h:79
Definition: sqldefs.h:77
Definition: sqldefs.h:86

+ 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 213 of file CalciteDeserializerUtils.cpp.

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

Referenced by RelAlgTranslator::translateLiteral().

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

+ 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:78
Definition: sqldefs.h:80
Definition: sqldefs.h:81
Definition: sqldefs.h:79
Definition: sqldefs.h:77
Definition: sqldefs.h:86

+ Here is the caller graph for this function:

DateaddField to_dateadd_field ( const std::string &  )

Definition at line 111 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().

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

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

+ Here is the caller graph for this function:

ExtractField to_datepart_field ( const std::string &  )

Definition at line 59 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().

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

+ 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::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:76
Definition: sqltypes.h:79
Definition: sqltypes.h:80
Definition: sqltypes.h:72
constexpr auto type_name() noexcept

+ Here is the caller graph for this function: